Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostCSS plugin xxx requires PostCSS 8 #380

Open
nico-martin opened this issue Jun 11, 2021 · 2 comments
Open

PostCSS plugin xxx requires PostCSS 8 #380

nico-martin opened this issue Jun 11, 2021 · 2 comments

Comments

@nico-martin
Copy link

I'm getting the following error:

[!] (plugin postcss) Error: PostCSS plugin postcss-nested requires PostCSS 8.
Migration guide for end-users:
https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users

But the thing is I'm already using PostCSS 8 and the latest version of rollup-plugin-postcss. So everything the Migration Guide recommends:

    "postcss": "^8.3.2",
    "postcss-import": "^14.0.2",
    "postcss-nested": "^5.0.5",
    "rollup": "^2.44.0",
    "rollup-plugin-postcss": "^4.0.0",

Any ideas why this error still appears? This happens with various PostCSS plugins.

@bidorffOL
Copy link

bidorffOL commented Jun 22, 2021

I have been having the same problem as well. However, I'm wondering if that could be related to cssnano still being in version 4.1.11 (and pulling with it postcss@7.0.36). So this may be solved by #357.

Someone mentioned here that rolling back to 3.1.8 may solve the problem (it does for me).

@ldeveber
Copy link

I tried upgrading cssnano but that did not work. I use storybook and the webpack 4 adapter still pulls in an old version of postcss (I believe they're dropping it completely in the next major release? I'm already using the experimental webpack 5 version). Adding this to my package.json worked for me:

  "resolutions": {
    "postcss": "^8.3.6"
  },

This obviously won't work for people who still need to rely on other things that need old postcss, but if you can upgrade all those things this worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants