-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Yarn add tailwind compat package error #3432
Comments
This sounds like a Yarn 2 or system related issue to me unfortunately, as this works as expected with npm. Going to close as no plans to dig in to this ourselves and this is the first time it has been reported. If it's a widespread issue we can circle back, or hopefully someone who actually uses Yarn 2 and has run into it and fixed it can share their solution. |
@adamwathan Sorry for the faulty bug report. This is definitely a yarn 2 bug. Thanks for creating TailwindCSS 🙏 For anyone else running into this issue, the fix is to specify the package version.
The root cause of the bug was because Yarn 2 doesn't handle alias without range properly. See the Yarn 2 issue here yarnpkg/berry#1816 If anyone is using React + TailwindCSS compat, hopefully after CRA supports PostCSS8, we can drop the compat package and use the mainline version. See this issue facebook/create-react-app#10456 |
Sorry for bringing this back. Just came across this, and the issue still exists. Maybe to make it easier for anyone in the future, the yarn equivalent commands could be added to the docs (https://tailwindcss.com/docs/guides/create-react-app)
... did it for me |
Some old commands were not working; replaced them with the new ones. Reference: for fixing package installation, took the reference from tailwindlabs/tailwindcss#3432 (comment)
Steps to repro
Create react app using https://create-react-app.dev/docs/getting-started
Update to v2 of Yarn https://yarnpkg.com/getting-started/migration
So far so good. Now try to install TailwindCSS compat build according to https://tailwindcss.com/docs/guides/create-react-app#install-tailwind-via-npm
System info
Repo to reproduce this issue
https://github.com/sshquack/tailwind-yarn-bug
The text was updated successfully, but these errors were encountered: