Unknown error from PostCSS plugin. Your current PostCSS version is 8.3.0, but postcss-preset-env uses 7.0.36. any one knows why this error is happening?
Unknown error from PostCSS plugin. Your current PostCSS version is 8.3.0, but postcss-preset-env uses 7.0.36
Asked Answered
You could be missing the .browserslistrc in the root of the project. If you pulled down from source control make sure whoever submitted the files originally remembered to include this file.
After migrating from Angular 11 to 12 I had the same error. After updating .browserslistrc to a newer version picked from another angular 12 project worked for me as well –
Kersten
Could you add a note to also generate a clean project using angular 12 cli and compare the package.json dependencies to your project's dependencies. Your solution helped me, but I also had to fix some dependencies. Biggest one seemed to be tslib which was completely missing –
Conrado
Deleting the node_modules
folder and the yarn.lock
file and reinstalling fixed the issue for me.
I think you need this pr https://github.com/csstools/postcss-preset-env/pull/211 to be merged.. then it should work.
There is a version mismatch in your postcss and the postcss version required by postcss-preset-env.
Or you could try downgrading your postcss.. but that will probably break everything else.
© 2022 - 2024 — McMap. All rights reserved.
.browserslistrc
, adjusting its content to a newly created with angular-cli stopped giving the error – Diplex