Home > OS >  PostCSS plugin tailwindcss requires PostCSS 8
PostCSS plugin tailwindcss requires PostCSS 8

Time:12-15

I keep getting the error below when trying to install Tailwind with Vue.js:

Syntax Error: Error: PostCSS plugin tailwindcss requires PostCSS 8.

I've tried several answers from Error: PostCSS plugin tailwindcss requires PostCSS 8, including:

npm uninstall tailwindcss postcss autoprefixer
vue add tailwind 

And

npm uninstall tailwindcss postcss autoprefixer
npm install -D tailwindcss@latest postcss@latest autoprefixer@latest

But nothing works. My package.json includes:

"dependencies": {
  "postcss": "^8.4.20",
  "tailwindcss": "^3"
},
"devDependencies": {
  "@vue/cli-service": "~4.5.11",
  "postcss-cli": "^8.0.0",
  "sass": "^1.56.2",
  "sass-loader": "^10.4.1",
  "vue-cli-plugin-tailwind": "~3.0.0"
}

I use Node 14.5.0.

Any suggestion as to how to solve this issue?

CodePudding user response:

You may have to update the @vue/cli and all its plugins to the newest version (5.0.0-rc.1), maybe the versions you have installed use PostCSS 7.

  • Related