PostCSS / Autoprefixer versions are currently throwing errors
See original GitHub issueIt looks like there are some issues with the combination of the most recent versions of PostCSS and Autoprefixer. New Redwood projects install PostCSS 7, and the instructions for installing Tailwind result in the newest version of Autoprefixer being installed (currently v10). There’s a compatibility issue between these versions.
The current recommendation seems to be install Autoprefixer v9. This fixed the error for me. (It was throwing Error: true is not a PostCSS plugin
).
There’s a relevant issue here.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Error: PostCSS plugin autoprefixer requires ... - Stack Overflow
PostCSS was updated to version 8, however, PostCSS CLI has not yet been updated to handle PostCSS plugins which use the new PostCSS...
Read more >postcss | Yarn - Package Manager
PostCSS is a tool for transforming styles with JS plugins. These plugins can lint your CSS, support variables and mixins, transpile future CSS...
Read more >autoprefixer - npm
Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website. Latest version: 10.4.13, last published: 2...
Read more >PostCSS Plugin Guidelines
The prefix postcss- shows that the plugin is part of the PostCSS ecosystem. ... You should test in (at least) Node.js active LTS...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jangxyz @thedavidprice and @jtoar
I realized what the issue is:
Need to use:
"tailwindcss": "npm:@tailwindcss/postcss7-compat"
as noted in https://community.redwoodjs.com/t/upgrading-to-tailwindcss-v2/1472.
@jangxyz If you switch your web package.json to:
and yarn … it should work again.
And it looks like @jtoar already fixed this in the next release:
https://github.com/redwoodjs/redwood/commits/main/packages/cli/src/commands/setup/tailwind/tailwind.js
I think we can keep this issue closed and direct people to the forum post until the next release.
Hi @jangxyz
I’ll try to reproduce with a fresh install of
create redwood app
andyarn rw setup tailwind
and see what might be happening.Here is a community post with some info on the upgrade from v1 to v2 for existing RWJS projects – and how to use TailwindUI as well:
https://community.redwoodjs.com/t/upgrading-to-tailwindcss-v2/1472/8