Closed babakfp closed 3 years ago
Please don't kill yourself 🤗
If you're hitting issues with needing PostCSS 8, you can always use the PostCSS compatibility build
version of Tailwind, which exists for this exact reason.
https://tailwindcss.com/docs/installation#post-css-7-compatibility-build
100% of the Tailwind v2 features are available as well in this build, so you won't be missing out on anything 👍
It's didn't worked. Same error.
"dependencies": {
"@tailwindcss/postcss7-compat": "^2.0.2",
"autoprefixer": "^9.8.6",
"compression": "^1.7.1",
"polka": "next",
"postcss": "^7.0.35",
"sirv": "^1.0.0",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.0.2"
},
What about these two:
"postcss-import": "^14.0.0",
"postcss-nested": "^5.0.3",
Those two dependencies require PostCSS 8, you will have to downgrade to postcss-import@^12
and postcss-nested@^4
if you want to use PostCSS 7. I'm not sure what dependency in your project is forcing you to use PostCSS 7 at quick glance though, guessing something to do with Sapper?
Regardless going to close this as not a real issue, there is nothing we can change in the Tailwind codebase that will fix this, you just need to make sure you are installing compatible versions of your dependencies.
We can help more in the future if you follow the issue template and provide an actual GitHub repository that reproduces your issue.
Hi.
It seems that you don't care that people have a problem. All you provide was just a very short post that was saying if you did get this error, do this. Don't get me wrong, it's a great tool and blah blah blah, I'm just saying that if you do something, do it well.
It took me so much(x10) time but I finally solved it.
yarn global add postcss@latest postcss-cli@latest
yarn add tailwindcss@latest autoprefixer@latest postcss-nested@latest postcss-import@latest
I expect that you make the postcss error post better and also add those to the post.
@adamwathan
Please install PostCSS 8 or above error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. please help me
I was facing the same issue but this worked for me "postcss-cli": "^7.1.2", "postcss-import": "^12.0.0", "postcss-nested": "^4.0.3", "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.1.0"
this command worked for me. npm install -D tailwindcss@latest postcss@latest autoprefixenpm install -D tailwindcss@latest postcss@latest autoprefixer@latestr@latest
Hi! I was researching and trying to fix this issue, and this worked for me:
npm install -D tailwindcss@latest postcss@latest autoprefixer@latest
My package.json is:
{
"name": "tailwindcssreact",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"axios": "^0.24.0",
"postcss-import": "^14.0.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "npm run watch:css && react-scripts start",
"build": "npm run build:css && react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"build:css": "postcss src/assets/tailwind.css -o src/assets/main.css",
"watch:css": "postcss src/assets/tailwind.css -o src/assets/main.css"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"autoprefixer": "^10.4.0",
"postcss": "^8.3.11",
"postcss-cli": "^9.0.1",
"tailwindcss": "^2.2.19"
}
}
Do I need to kill myself to Tailwind work properly?