# Fresh build of Sage dev-master failing with StyleLint error

**URL:** https://discourse.roots.io/t/fresh-build-of-sage-dev-master-failing-with-stylelint-error/14225
**Category:** sage
**Tags:** webpack, sage9
**Created:** 2018-11-26T22:32:25Z
**Posts:** 12

## Post 1 by @raffjones — 2018-11-26T22:32:25Z

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.

---

## Post 2 by @ben — 2018-11-26T23:11:15Z

`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)

---

## Post 3 by @raffjones — 2018-11-26T23:28:41Z

> [@raffjones](#):
>
> Invalid Option: Unexpected option value “[object Object]” for rule “at-rule-no-unknown”

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.

---

## Post 4 by @ben — 2018-11-26T23:36:31Z

> [@raffjones](#):
>
> Yes, I already mentioned the specific error.

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

---

## Post 5 by @raffjones — 2018-11-26T23:39:42Z

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.

---

## Post 6 by @mmirus — 2018-11-27T00:47:01Z

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
      }
    }
  }
}
```

---

## Post 7 by @mmirus — 2018-11-27T01:52:19Z

This is resolved. Thanks for reporting, @raffjones!

Related: [https://github.com/roots/sage/pull/2131](https://github.com/roots/sage/pull/2131)

---

## Post 8 by @raffjones — 2018-11-27T10:15:57Z

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

---

## Post 9 by @steve — 2019-06-01T18:22:02Z

My apologies if it’s not correct protocol to bump old and resolved threads, but I didn’t want to create another thread with an almost exact issue.

I ran yarn build and got this error:

> **yarn run v1.16.0**
> 
> $ webpack --progress --config resources/assets/build/webpack.config.js
> 
> Error: Failed because of a stylelint error.
> 
> at linter.then (/var/www/companyname.com/wordpress/wp-content/themes/companyname/node\_modules/stylelint-webpack-plugin/lib/run-compilation.js:39:14)
> 
> error Command failed with exit code 1.
> 
> info Visit **[yarn run | Yarn](https://yarnpkg.com/en/docs/cli/run)** for documentation about this command.

Is the fix still to remove the following from the bottom of package.json?

> “stylelint”: {  
> “rules”: {  
> “at-rule-no-unknown”: {  
> “1”: {  
> “ignoreAtRules”: null  
> }  
> }  
> }  
> }

I didn’t install from dev-master, I just ran composer create-project roots/sage your-theme-name

---

## Post 10 by @Kevin_Malone — 2019-06-03T17:38:48Z

I’m having the exact same issue with Yarn Build. also running webpack --progress --config and then failes at linter.then.

should mention my error occurs same line, same character.

---

## Post 11 by @steve — 2019-06-03T17:41:18Z

Hi @Kevin_Malone,

I ran:

> yarn run lint:styles

And I got back a detailed error and was able to fix it.

In my case, in the \_variables.scss file, there was an error in how I was writing the primary color hex code and I needed an extra blank line at the end of the entire file.

Hope this helps.

Kind regards,

Steve

---

## Post 12 by @Kevin_Malone — 2019-06-03T19:12:58Z

> [@Kevin_Malone](#):
>
> at linter.then.

Indeed, I reached the same solution after some digging. Good stuff. Thanks bud.
