autoprefixer: Error: [object Object] is not a PostCSS plugin
I just happened to setup a new workstation, installed some tools to process SASS files and called something like npm i -g node-sass postcss postcss-cli clean-css-cli autoprefixer browserslist on the command line.
I tried to prefix a css files using a statement like postcss expanded.css -u autoprefixer -o prefixed.css --no-map and got error Error: [object Object] is not a PostCSS plugin
I downgraded to autoprefixer@9 and the error went away.
I see version 10 had just been pushed. Is there an issue?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 18
- Comments: 27 (9 by maintainers)
Links to this issue
Commits related to this issue
- Note unpin autoprefixer - Seems https://github.com/postcss/autoprefixer/issues/1358 is fixed — committed to victoriadrake/hugo-theme-introduction by victoriadrake 3 years ago
- Theme: Install postcss as peer dependency to fix watcher. See https://github.com/postcss/autoprefixer/issues/1358#issuecomment-693175534 See https://github.com/postcss/autoprefixer/issues/1358#issuec... — committed to WordPress/five-for-the-future by iandunn 2 years ago
- Theme: Install postcss as peer dependency to fix watcher. See https://github.com/postcss/autoprefixer/issues/1358#issuecomment-693175534 See https://github.com/postcss/autoprefixer/issues/1358#issuec... — committed to goldentroll/five-for-the-future by goldentroll 2 years ago
had
Error: true is not a PostCSS pluginafter upgrading to v10.Then I read the changelog which mentions
postcssbeing moved topeerDepso I
npm i postcssed and it went awaySame here:
My
postcss.config.js:Same here. What a mess today in the world with CI/CD environments! 😄
@m4thieulavoie Yeap, Gulp users needs to wait before updating to PostCSS 8 plugins
Did you update to Autoprefixer 10? It do not work with old PostCSS 7 and require PostCSS 8.
Wait a little until
postcss-cliandgulp-postcsswas released.npm install -D postcssfixed this issue for me usingrollup+rollup-plugin-postcssNot working for me. I use postcss through parcel-bundler and configured it via
postcss.config.jsand added postcss as a dev dependency.which resolves in
true is not a PostCSS plugin.I think parcel has to act here - or autoprefixer respectively.
I added
Known Issuessection to PostCSS 8 changelog https://github.com/postcss/postcss/releases/tag/8.0.0Same as above, but with a
gulptaskI also met the problem of:
Error loading PostCSS config: Invalid PostCSS Plugin found: [1]. the [1] is the autoprefixer plugin. I am using vue2 and just css. I tried many versions and this configuration saved my day:and postcss.config.js:
and webpack:
hope that’s helpful.
@billyromano report an issue in
gulp-postcss. 9.0 should support PostCSS 8 plugins.