Closed dfalling closed 4 years ago
Nope, what you're showing me looks good; I suspect dependency issues; what's the output of npm ls
in your project directory?
npm ls
output:
Found it! The error message indicates it's coming from ./node_modules/react-scripts/node_modules/postcss-loader
, which means your build process isn't using the version of postcss-loader
you have in your package.json
, it's using the postcss-loader
that react-scripts
pulls in, which happens to be postcss-loader@3.0.0
: https://github.com/facebook/create-react-app/blob/aec42e2cc05fe0799a3b73830b874757e9e3f561/packages/react-scripts/package.json#L69
To use postcss v8 plugins, you'll either have to stop using react-scripts
, or wait for react-scripts
to upgrade their version of postcss-loader
to be compatible with postcss
v8. Of course, you can also downgrade to postcss-import
v12, which uses postcss
v8.
Oh wow, great catch. Thanks!
In case anyone else hits this error, I was getting it because I forgot to update my global postcss-cli
installation to 8.x
Updating postcss-cli
cleared everything up 👍
v13 of this plugin won't compile for me. Is there something different I need to do to import the plugin as of v13?
Node 10.18.0
postcss.config.js:
package.json: