Roots Discourse

Fresh build of Sage dev-master failing with StyleLint error

sage9

#1

I just used composer create-project roots/sage five dev-master to install Sage - with no framework.

The build is failing. I’ve used it so many times in the past with no issues, but I can’t get this one to work. Has something changed recently?

Seeing this when I run yarn start:

Invalid Option: Unexpected option value "[object Object]" for rule "at-rule-no-unknown"

yarn build is yielding this:

Error: Failed because of a stylelint error

at linter.then (/Library/WebServer/Documents/base/wp5/wp- 
content/themes/five/node_modules/stylelint-webpack-plugin/lib/run-compilation.js:39:14)
error Command failed with exit code 1.

Anyone else seen this? Any ideas gratefully received.


#2

dev-master is not 9.0.5 FYI. Hopefully master isn’t broken! :smiley:

yarn lint should show the specific error (also shown in console/on screen during BrowserSync session)


#3

Yes, I already mentioned the specific error.

I have commented out everything from main.scss and main.js and it’s still not happy - won’t build. This is the first time I’ve had Sage fail to build.


#4

Cool. Thanks! It looks like master is broken right now. Please use 9.0.5 or other previous releases for a working build.


#5

Thanks for the swift reply. Hope it’s an easy fix :slight_smile:

I can confirm that:

composer create-project roots/sage five 9.0.5 worked perfectly and there are no build issues.


#6

We’re working on a fix for this, but at the moment the workaround is just opening up package.json after you install from dev-master and removing this from the bottom:

"stylelint": {
  "rules": {
    "at-rule-no-unknown": {
      "1": {
        "ignoreAtRules": null
      }
    }
  }
}

#7

This is resolved. Thanks for reporting, @raffjones!

Related: https://github.com/roots/sage/pull/2131


#8

Thanks for that quick response, @mmirus. It’s all working sweetly now.