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

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.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 17

Commits related to this issue

Most upvoted comments

got the same error, any updates?

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

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.

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.

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.