【发布时间】:2021-11-10 22:54:06
【问题描述】:
我正在使用 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 /Users/mgav/zagnetic_vue/zagnetic/node_modules/webpack-chain/src/Config.js:129:63
at Array.map (<anonymous>)
at module.exports.toConfig (/Users/mgav/zagnetic_vue/zagnetic/node_modules/webpack-chain/src/Config.js:129:40)
at Service.resolveWebpackConfig (/Users/mgav/zagnetic_vue/zagnetic/node_modules/@vue/cli-service/lib/Service.js:261:34)
由于 Package-Lock.json 在发生错误的那几个小时内有 吨 的变化(但 Package.json 100% 未发生变化),是否可以只粘贴19 小时前的 Package-Lock.json 文件覆盖当前文件,解决问题?
这样做有什么危险吗?
我的工作几乎完全是 CSS,但我在错误发生后做了一些基本的事情,比如 npm cache clean --force 这可能导致了一些 Package-Lock.json 差异。
Package-lock.json 太大而无法发布,但这是我的 package.json(与推送到 GitHub 的工作版本和当前 ( un-pushed) 有错误的版本:
{
"name": "zagnetic",
"version": "0.1.0",
"private": true,
"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",
"@tailwindcss/forms": "^0.3.3",
"@tailwindcss/typography": "^0.4.1",
"@vue/cli": "^5.0.0-beta.3",
"core-js": "^3.6.5",
"date-fns": "^2.23.0",
"firebase": "^8.9.0",
"tailwindcss": "^2.2.14",
"vue": "^3.0.0",
"vue-router": "^4.0.0-0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^5.0.0-beta.3",
"@vue/cli-plugin-router": "^5.0.0-beta.3",
"@vue/cli-service": "^5.0.0-beta.3",
"@vue/compiler-sfc": "^3.2.11",
"autoprefixer": "^10.3.4",
"postcss": "^8.3.6",
"postcss-cli": "^8.3.1"
}
}
我已经使用"^5.0.0-beta.3" 快一周了,没有任何问题,所以我认为这不是问题。
非常感谢您的帮助!
【问题讨论】:
标签: vue.js vuejs3 package-lock.json validationerror