0

Anyone know how to get composes working in gatsby css modules. I've tried using.

.dog {
  composes: dog from "styles/common.scss"
}

I get this error.

Your current PostCSS version is 5.2.18, but postcss-nesting uses 6.0.23. Perhaps this is the source of the error below.

I've tried installing postcss-nesting But that doesn't seem to stop the above error in gatsby

coreyward
  • 77,547
  • 20
  • 137
  • 166
me-me
  • 5,139
  • 13
  • 50
  • 91

1 Answers1

0

Your current PostCSS version is 5.2.18, but postcss-nesting uses 6.0.23. Perhaps this is the source of the error you're running into.

Try upgrading PostCSS to at least 6.0

coreyward
  • 77,547
  • 20
  • 137
  • 166
  • Yea thats what I thought but thats controlled from gatsby. Its not an npm update. Not sure how to do that without updating gatsby itself ? – me-me Aug 27 '18 at 18:08
  • Which version of Gatsby are you on? Where are the nested dependencies on `postcss-nesting` and `postcss` coming from? – coreyward Aug 27 '18 at 22:00
  • Gatsby Version 1.1.58, Not sure what you mean by your second question. Scss is where I'm nesting css and want to use compose – me-me Sep 01 '18 at 18:18
  • Okay, you may want to update your Gatsby to the latest stable (1.9.x) to see if that helps. Re: Nested dependencies, please read up on the package manager you're using (yarn or npm). – coreyward Sep 01 '18 at 18:22
  • Ok I'll try that. postcss-nesting is not been used. I tried installing it up it didn't fix the issue. I'll try upgrading. – me-me Sep 01 '18 at 18:24
  • I also tried searching Gatsby docs about Gatsby Version 1.1.58 not compatible with compose but didn't find anything. Would love to know for sure if its not compatible. – me-me Sep 01 '18 at 18:25
  • What should be the latest version # when I run gatsby --version ? – me-me Sep 01 '18 at 18:35