Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SassC::SyntaxError: Error: style declaration must contain a value #32019

Closed
mayur-kambariya opened this issue Oct 30, 2020 · 16 comments
Closed

Comments

@mayur-kambariya
Copy link

image

During deploy rails application on heroku

@mdo
Copy link
Member

mdo commented Oct 30, 2020

This looks like any error on your part? Can't see anything that says Bootstrap is to blame here.

@mdo mdo closed this as completed Oct 30, 2020
@r1x1
Copy link

r1x1 commented Oct 30, 2020

@mdo We're also seeing this, it appears that it was introduced in v4.5.1 with this change: #30957

You'll also see another comment on that issue reporting the same problem.

For now we're pinning at v4.5.0 to avoid this.

@ffoodd
Copy link
Member

ffoodd commented Oct 30, 2020

Nullifying the value should not output the property. What's the Sass compiler you use?

@r1x1
Copy link

r1x1 commented Oct 30, 2020

Nullifying the value should not output the property. What's the Sass compiler you use?

In our case Bootstrap (bootstrap/scss/bootstrap.scss) is being passed through the newest release of the sassc-ruby gem, which it appears is using LibSass 3.6.1 for compilation.

For completeness, the error we're seeing:

SassC::SyntaxError: Error: style declaration must contain a value
        on line 8038:13 of stdin
>>   box-shadow:;

   ------------^

@mdo mdo reopened this Oct 30, 2020
@XhmikosR
Copy link
Member

XhmikosR commented Nov 8, 2020

Have you tried reporting the issue upstream?

We only test node-sass and dart sass and we cannot guarantee things will work with other implementations.

@leoplct
Copy link

leoplct commented Nov 13, 2020

We are having the same issue +1

@XhmikosR
Copy link
Member

#32019 (comment)

@XhmikosR
Copy link
Member

@ffoodd @MartijnCuppens @mdo: since people don't seem to report the issue upstream

  1. we either report it upstream ourselves and hope they fix it
  2. figure out if we can revert the offending change
  3. ignore the issue since it's something we don't test nor use ourselves

@ffoodd
Copy link
Member

ffoodd commented Nov 19, 2020

From my understanding:

  1. @rasbary mentionned that the sassc-ruby gem used Libsass under the hood, and Libsass is deprecated. So either we report
    • upstream #1 (sassc-ruby gem) and suggest to switch to dart-sass
    • upstream #2: Libsass compilation failure when nullifying a value (if it can be reproduced with Libsass directly)
  2. @rasbary also spotted the offending PR (nullify custom forms states' box-shadow #30957) which can be reverted easily, with as single drawback to output a few useless box-shadow: none.

FYI: I tried things out on Sassmeister and whatever compiler I use, nothing wrong happens.

@MartijnCuppens
Copy link
Member

Yeah, pretty weird it happens now, since we we've been using null variables for quite a while now (#28035)

@mdo
Copy link
Member

mdo commented Dec 3, 2020

I think this is something we ignore and close as a won't fix? Seems like there's not much to change here and we're on Dart Sass now.

@XhmikosR
Copy link
Member

XhmikosR commented Dec 3, 2020

We also have #29760 FYI.

@mdo
Copy link
Member

mdo commented Dec 3, 2020

Yeah, I say we close for that issue.

@mdo mdo closed this as completed Dec 3, 2020
@yoones
Copy link

yoones commented Dec 4, 2020

I have the same issue when I put $enable-shadows: true; in my scss file. Setting this to false doesn't trigger an error.

yarn package.json: "bootstrap": "^4.5.3"

@Frimlik
Copy link

Frimlik commented Mar 31, 2021

I have the same issue when I put $enable-shadows: true; in my scss file. Setting this to false doesn't trigger an error.

yarn package.json: "bootstrap": "^4.5.3"

I think $enable-shadows: true; is the default value. At least I haven't found this command in my code.
I spent few days and sleepless nights implanting node-sass-json-importer into Angular 10 (to be able to use values from json file in scss) and this was my last obstacle...
But interesting thing for me was that when I looked at #30957 and did "revert" in my local code (insert none instead of null), everything worked fine as well.

@wongwf82
Copy link

This answer on SO worked for me:
https://stackoverflow.com/questions/70401077/rails-7-asset-pipeline-sasscsyntaxerror-with-tailwind/70665740#70665740

I put inside production.rb and deployment to Heroku was fine, while retaining gem "sassc-rails" in my Gemfile though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants