vue3本地运行错误集
1、解决报错ValidationError: Progress Plugin Invalid Options问题
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
ValidationError: Progress Plugin Invalid Options
options should NOT have additional properties
options should NOT have additional properties
options should NOT have additional properties :10)ateOption at C:\Users\zero1\dongruan2023\shop\shopadmin\node_modules\webpack-chain\src\Plugin.js:14:18 ginAPI.js:132:25)at PluginAPI.resolveWebpackConfig (C:\Users\zero1\dongruan2023\shop\shopadmin\node_modules\@vue\cli-service\lib\Plug
at serve (C:\Users\zero1\dongruan2023\shop\shopadmin\node_modules\@vue\cli-service\lib\commands\serve.js:79:31)
at Service.run (C:\Users\zero1\dongruan2023\shop\shopadmin\node_modules\@vue\cli-service\lib\Service.js:262:12)
at processTicksAndRejections (node:internal/process/task_queues:96:5)n\node_modules\webpack-chain\src\Config.js:129:
运行下面的代码即可:
npm install -g yarn
yarn install
就可以继续运行:npm run serve 了
参考地址:解决报错ValidationError: Progress Plugin Invalid Options问题-CSDN博客
2、yarn 安装包时报“certificate has expired”
在通过yarn包管理器安装 yarn install 时候报错: error Error: certificate has expired:
info No lockfile found.
[1/4] Resolving packages...
error Error: certificate has expired
at TLSSocket.onConnectSecure (node:_tls_wrap:1539:34)
at TLSSocket.emit (node:events:513:28)
at TLSSocket._finishInit (node:_tls_wrap:953:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:734:12)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
问题原因:是【HTTPS 证书验证失败】导致的
解决方案:
将yarn配置中的 strict-ssl 设置为 flase , 在 info yarn config 信息中, 'strict-ssl' 为 true,表示需要验证 HTTPS 证书。我们可以将 'strict-ssl' 设置为 false,跳过 HTTPS 证书验证。
设置方式如下:
首先通过 yarn config list 查看yarn的配置清单里的strict-ssl:
使用命令yarn config set strict-ssl false将其改为 false 即可
再次运行安装命令即可顺利安装
使用命令yarn config set strict-ssl false将其改为 false 即可
% yarn config set strict-ssl false
yarn config v1.22.21
success Set "strict-ssl" to "false".
✨ Done in 0.02s.
再次运行安装命令即可顺利安装
问题延展
npm包管理器安装时也遇到过类似的问题,问题原因也是和上面一样的,都是【HTTPS 证书验证失败】。解决办法也是一样的,将npm包管理器的 strict-ssl 的值改为 false 即可。类似报以上的错误,都可以将包的 strict-ssl 的值改为 false
参考地址:yarn 安装包时报“certificate has expired” - 专栏家
3、error Found incompatible module.
在尝试使用Yarn安装依赖时遇到了错误,错误信息提示js-cookie模块与当前Node.js版本10.13.0不兼容,需要版本大于等于12。为了解决这个问题,可以暂时禁用Yarn的引擎检查。执行`yarn config set ignoreEngine true`即可忽略版本检查继续安装。
报错:
[1/4] Resolving packages...
[2/4] Fetching packages...
error js-cookie@3.0.0: The engine "node" is incompatible with this module. Experror js-cookie@3.0.0: The engine "node" is incompatible with this module. Exp
ected version ">=12". Got "10.13.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about thi
s command.
解决方案
解决版本过低的问题 忽略引擎检查,解决版本过低的问题
yarn config set ignore-engines true
参考地址:error Found incompatible module.-CSDN博客