Vue3中遇到问题:PostCSS plugin tailwindcss requires PostCSS 8 解决方案
生活随笔
收集整理的這篇文章主要介紹了
Vue3中遇到问题:PostCSS plugin tailwindcss requires PostCSS 8 解决方案
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
文章目錄
- 遇到問題
- 解決方法
- 參考
遇到問題
ERROR Failed to compile with 1 error 4:45:27 PMerror in ./src/assets/tailwind.cssSyntax Error: Error: PostCSS plugin tailwindcss requires PostCSS 8. Migration guide for end-users: https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users解決方法
$ npm uninstall autoprefixer postcss tailwindcss $ vue add tailwind - selecting minimal option具體過程如下
azheng@lishizheng:/mnt/e/shizheng_coding/vue3_express/vue_express_tailwind_map_web/client$ npm uninstall autoprefixer postcss tailwindcssremoved 45 packages, and audited 1480 packages in 12s3 packages are looking for fundingrun `npm fund` for details72 vulnerabilities (61 moderate, 11 high)To address issues that do not require attention, run:npm audit fixTo address all issues (including breaking changes), run:npm audit fix --forceRun `npm audit` for details. azheng@lishizheng:/mnt/e/shizheng_coding/vue3_express/vue_express_tailwind_map_web/client$ vue add tailwind - selecting minimal optionWARN There are uncommitted changes in the current repository, it's recommended to commit or stash them first. ? Still proceed? Yes📦 Installing vue-cli-plugin-tailwind...added 1 package in 3s3 packages are looking for fundingrun `npm fund` for details ? Successfully installed plugin: vue-cli-plugin-tailwind? Generate tailwind.config.js minimal ? tailwind.config.js already exists! Do you want to replace it? Yes🚀 Invoking generator for vue-cli-plugin-tailwind... 📦 Installing additional dependencies...added 97 packages, removed 126 packages, and changed 1 package in 12s ? Running completion hooks...? Successfully invoked generator for plugin: vue-cli-plugin-tailwind然后重新npm run serve,成功
參考
https://www.youtube.com/watch?v=vfqjz-JnfXc下的評(píng)論
總結(jié)
以上是生活随笔為你收集整理的Vue3中遇到问题:PostCSS plugin tailwindcss requires PostCSS 8 解决方案的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: IDEA中Java项目如何新建JUnit
- 下一篇: git回滚到历史版本,并且删除本地unt