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: Silent comments aren't allowed in plain CSS. #14

Open
h0jeZvgoxFepBQ2C opened this issue Nov 3, 2023 · 1 comment

Comments

@h0jeZvgoxFepBQ2C
Copy link

Hi,

we upgraded from webpacker to dartsass-sprockets but get now following errors during compilation:

SassC::SyntaxError: Error: Silent comments aren't allowed in plain CSS.
  ╷
1 │ //= require jquery-ui/all
  │ ^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  ../../../../jquery-ui-rails-6.0.1/app/assets/stylesheets/jquery-ui.css 1:1                             @import
  sassc-embedded-import:2 1:9                                                                            @import
  /Users/myuser/coding/myproject/app/assets/stylesheets/customer_layout.css.scss 2:9  root stylesheet
../../.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/jquery-ui-rails-6.0.1/app/assets/stylesheets/jquery-ui.css:1

Caused by:
Sass::CompileError: Silent comments aren't allowed in plain CSS.

Tasks: TOP => assets:precompile

It seems that dartsass tries to compile .css files (not .scss files) - how can I fix this?

@johnnyshields
Copy link
Contributor

The workaround is to rename everything to .scss.

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

No branches or pull requests

2 participants