我正在使用 Vue 3,并且 19 小时前我将项目的一个运行良好的版本推送到了 GitHub。
大约5个小时后,当我输入时出现以下问题npm run serve
,导致出现以下几行信息:
> zagnetic@0.1.0 serve
> vue-cli-service serve
INFO Starting development server...
然后出现以下错误:
ValidationError: Progress Plugin Invalid Options
options should NOT have additional properties
options should NOT have additional properties
options should NOT have additional properties
options should pass "instanceof" keyword validation
options should match exactly one schema in oneOf
at validateOptions (/Users/mgav/zagnetic_vue/zagnetic/node_modules/webpack/node_modules/schema-utils/src/validateOptions.js:32:11)
at new ProgressPlugin (/Users/mgav/zagnetic_vue/zagnetic/node_modules/webpack/lib/ProgressPlugin.js:62:3)
at new Progress (/Users/mgav/zagnetic_vue/zagnetic/node_modules/progress-webpack-plugin/index.js:25:21)
at new progressPlugin (/Users/mgav/zagnetic_vue/zagnetic/node_modules/progress-webpack-plugin/index.js:127:10)
at /Users/mgav/zagnetic_vue/zagnetic/node_modules/webpack-chain/src/Plugin.js:14:18
at Object.toConfig (/Users/mgav/zagnetic_vue/zagnetic/node_modules/webpack-chain/src/Plugin.js:78:22)
at …
Run Code Online (Sandbox Code Playgroud) 我正在使用没有 Vite 的Vue版本 3.2.10 并尝试安装Tailwind CSS版本2.2.14 (最新)。
重要提示:Vue 版本 3.0.6 开始支持 PostCSS 8(有关更新,请参阅 GitHub 文档中的“功能”下的第 3 点)
仔细遵循安装说明后,然后运行npm run serve
我不断收到此错误:
error in ./src/assets/main.css
Syntax Error: Error: PostCSS plugin tailwindcss requires PostCSS 8.
Migration guide for end-users:
https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users
Run Code Online (Sandbox Code Playgroud)
这是我的 package.json 文件:
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-brands-svg-icons": "^5.15.4",
"@fortawesome/free-regular-svg-icons": "^5.15.4",
"@fortawesome/free-solid-svg-icons": "^5.15.4",
"@fortawesome/vue-fontawesome": "^3.0.0-4",
"@headlessui/vue": "^1.4.1",
"core-js": "^3.6.5",
"date-fns": "^2.23.0",
"firebase": "^8.9.0", …
Run Code Online (Sandbox Code Playgroud) 我使用的是 Vue 版本 3.2.1,并遵循Vue 3的官方 font Awesome 文档(https://github.com/FortAwesome/vue-fontawesome)以及此视频:https://www.youtube.com/watch?v=MoDIpTuRWfM
尴尬的是,我似乎无法更改图标的颜色,尽管我可以更改背景颜色(请参阅屏幕截图中的向上箭头)和不透明度(请参阅屏幕截图中的婴儿车)。
这是我的代码:
main.js:
// BEGIN font awesome icons, per https://github.com/FortAwesome/vue-fontawesome
import { library } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon, fontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { fas } from '@fortawesome/free-solid-svg-icons' // OPTIMIZE THIS LATER
import { fab } from '@fortawesome/free-brands-svg-icons' // OPTIMIZE THIS LATER
import { far } from '@fortawesome/free-regular-svg-icons' // OPTIMIZE THIS LATER
import { dom } from '@fortawesome/fontawesome-svg-core'
dom.watch() // This will kick of the …
Run Code Online (Sandbox Code Playgroud)