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

Slate - CssSyntaxError: /stylesheets/screen.css:5:1: Unknown word #2302

Closed
prawen opened this issue Dec 13, 2019 · 17 comments
Closed

Slate - CssSyntaxError: /stylesheets/screen.css:5:1: Unknown word #2302

prawen opened this issue Dec 13, 2019 · 17 comments
Labels

Comments

@prawen
Copy link

prawen commented Dec 13, 2019

Hello All,

I have just stared using slate and they use middleman and see you as contributors in their list. I hope this is the forum to ask my question. In case this is not the place, please let me know.

I'm trying to build the static content to host apidocs on a webserver. But I'm getting below error.

bundle exec middleman build --clean
== Sprockets will render css with SassC
CssSyntaxError: /stylesheets/screen.css:5:1: Unknown word
3 | 
@import
 'variables';
4 | 
@import
 'icon-font';

    5 | //
    @import
    'rtl'; // uncomment to switch to RTL format | ^ 6 | 7 | /*

bundler: failed to load command: middleman (/home/praveen/.rbenv/versions/2.6.5/bin/middleman)
ExecJS::RuntimeError: CssSyntaxError: /stylesheets/screen.css:5:1: Unknown word
3 | 
@import
 'variables';
4 | 
@import
 'icon-font';

    5 | //
    @import
    'rtl'; // uncomment to switch to RTL format | ^ 6 | 7 | /*

Input.error ((execjs):60175:16)
Parser.unknownWord ((execjs):62409:22)
Parser.other ((execjs):62014:12)
  • Ruby version: ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
  • Middleman version:
    gem middleman ~>4.3
    gem middleman-syntax ~> 3.0
    gem middleman-autoprefixer ~> 2.7
    gem middleman-sprockets ~> 4.1
  • OS version: Ubuntu Server 16.04

I hope I have provided enough information. Please let me know if you need any additional details.

@jinixx
Copy link

jinixx commented Dec 16, 2019

got the same error, any updates?

@tpobozy
Copy link

tpobozy commented Apr 2, 2020

same here

@DarthShmev
Copy link

Same here

@VisionaireStudioSimon
Copy link

Got the same error. Fixed it by removing middleman-sprockets and sass and activate :sprockets from my config.rb. But it unfortunately breaks the js requires. Maybe it's time to move to nodejs.

@tomrutgers
Copy link

@VisionaireStudioSimon You can abandon sprockets with the external pipeline. I've put together a webpack starter that has all the essentials.

@paladini
Copy link

Having the same problem here, guys. There's any workaround? I tried what @VisionaireStudioSimon suggested, however it did not work for me. Using Ubuntu 19.10 here.

I don't get your suggestion, @tomrutgers , can you explain?

@tomrutgers
Copy link

@paladini I'm not sure what the issue is, but it's caused by middleman-sprockets. That's a gem that takes care of importing assets like javascript (eg. #= require bootstrap) and sass files (eg @import bootstrap;). If you remove middleman-sprockets the error goes away, but you won't be able to import assets through the asset pipeline.

Instead, you can set up an external asset pipeline: https://middlemanapp.com/advanced/external-pipeline/. The webpack starter I posted above is an example of such a workflow.

@Voxoff
Copy link

Voxoff commented Apr 29, 2020

In case google directs anyone from slate with the error message. You can temporarily avoid the problem by downgrading middleman-sprockets. (I found migrating slate to webpack v time consuming).

Hope it helps whilst a solution is found.

@aep
Copy link

aep commented May 2, 2020

@VisionaireStudioSimon You can abandon sprockets with the external pipeline. I've put together a webpack starter that has all the essentials.

thanks, that's helpful. although i'm really confused by it. if middleman requires webpack anyway now whats the advantage of using middleman versus just webpack? webpack requires incredible effort to manage due to frequent breaking changes

@ulidtko
Copy link

ulidtko commented May 14, 2020

My understanding: the CssSyntaxError is thrown by gem SassC, which supposedly replaces gem sass — but as we can see, not quite completely.

The workaround for me was to update to Slate 2.4.0, which brings in gem 'sass' into Gemfile, and so middleman-sprockets works again, albeit with EOL warning about Sass.

middleman/middleman-sprockets#132 has similar discussion. But the ::Sprockets::Autoload::Sass = ::SassC hack from there didn't work for me, no idea why.

Timothy-Edwards added a commit to Accelo/docs that referenced this issue Sep 22, 2020
Ensure that we keep middleman sprockets at a lower version for the moment, as the latest version breaks sass imports middleman/middleman#2302
@stale
Copy link

stale bot commented Jul 17, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 17, 2021
@ulidtko
Copy link

ulidtko commented Jul 19, 2021

@Stale nope, undo.

@stale stale bot closed this as completed Jul 26, 2021
@tdreyno tdreyno reopened this Jul 28, 2021
@stale stale bot removed the wontfix label Jul 28, 2021
@stale
Copy link

stale bot commented Sep 26, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 26, 2021
@stale stale bot closed this as completed Oct 3, 2021
@tomrutgers
Copy link

Not stale

@danjohnson3141
Copy link

I'm getting these errors too

@ulidtko
Copy link

ulidtko commented Oct 12, 2021

That's all in vain, it won't obey. @stalebot is a rogue bot, and has been caught multiple times violating Asimov's second law of robotics.

See probot/stale#312 probot/stale#343 open-rpc/playground#543 Jguer/yay#1125 those I could easily remember; there's more.

Unfortunately I don't know where the robot prison is or how to call the Robocop 😃

But it seems that GitHub itself is the owner of the bot. Unfortunately, they ignore user feedback given on their own platform: https://github.com/probot/stale/issues — no maintainer response to be seen. Perhaps a well-written Customer Support ticket will do?..

chadlwilson added a commit to gocd/api.go.cd that referenced this issue Dec 24, 2021
Bump middleman-autoprefixer from 2.10.1 to 3.0.0

Sprockets needs to be locked at 3.7.2 due to middleman/middleman-sprockets#132 and middleman/middleman#2302

Just trying to bump dependencies as much as possible; not refactor/replace the asset pipeline just now.
chadlwilson added a commit to gocd/plugin-api.go.cd that referenced this issue Dec 24, 2021
Bump middleman-autoprefixer from 2.10.1 to 3.0.0

Sprockets needs to be locked at 3.7.2 due to middleman/middleman-sprockets#132 and middleman/middleman#2302

Just trying to bump dependencies as much as possible; not refactor/replace the asset pipeline just now.
chadlwilson added a commit to gocd/plugin-api.go.cd that referenced this issue Dec 24, 2021
Bump middleman-autoprefixer from 2.10.1 to 3.0.0

Sprockets needs to be locked at 3.7.2 due to middleman/middleman-sprockets#132 and middleman/middleman#2302

Just trying to bump dependencies as much as possible; not refactor/replace the asset pipeline just now.
@mavaddat
Copy link

mavaddat commented Feb 5, 2022

Slatedocs are dead. Long live mermade/reslate.

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

No branches or pull requests