11

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?

digish a d
  • 441
  • 1
  • 6
  • 10

3 Answers3

3

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.

trevorcroft
  • 167
  • 1
  • 3
  • 2
    my project already had the file `.browserslistrc`, adjusting its content to a newly created with angular-cli stopped giving the error – marcosalpereira Oct 26 '21 at 10:25
  • 4
    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 – Dylanbob211 Feb 03 '22 at 14:47
  • 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 – Jared Beach Jan 24 '23 at 19:11
-1

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.

sur.la.route
  • 440
  • 3
  • 11
-1

Deleting the node_modules folder and the yarn.lock file and reinstalling fixed the issue for me.

Robin
  • 1,438
  • 2
  • 19
  • 29