可以粘贴 19 小时前的 Package-Lock.json 来修复“ValidationError:进度插件无效选项”(Vue 3)吗?

2023-12-31

我正在使用 Vue 3,并且 19 小时前我将项目的一个运行良好的版本推送到了 GitHub。

大约5小时后,进入时出现以下问题npm run serve这导致了这些信息:

> [email protected] /cdn-cgi/l/email-protection 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 有tons在发生错误的几个小时内发生的更改(但 Package.json 100% 未更改),是否可以将 19 小时前的 Package-Lock.json 文件粘贴到当前文件上来解决问题?

这样做有什么危险吗?

我的工作几乎完全是CSS,但在错误发生后我做了一些基本的事情,比如npm cache clean --force这可能导致某些 Package-Lock.json 差异。

包lock.json太大了,无法发布,但这是我的包.json(推送到 GitHub 的工作版本和当前(未推送)版本相同,但有错误:

{
  "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"差不多一个星期了,没有任何问题,所以我认为这不是问题。

非常感谢您的帮助!


在尝试恢复到旧的 package-lock.json 之前,I ran npm update在终端中,现在一切正常!

I'm not将此标记为正确答案,即使它解决了根本问题,因为它实际上并没有解决所提出的问题(“是否可以恢复到 package-lock.json 的早期版本,而不造成任何伤害?” )。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

可以粘贴 19 小时前的 Package-Lock.json 来修复“ValidationError:进度插件无效选项”(Vue 3)吗? 的相关文章

随机推荐