vue 前端项目启动 异常

最近在分析开源项目vue,运行前端部分项目时,npm install遇到了bug
之前在其他项目中运行npm install都不存在该问题;node 版本冲突导致 重新更新版本即可

s\npm\bin\npm-cli.js install --scripts-prepend-node-path=auto
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: @babel/core@7.0.0
npm ERR! node_modules/@babel/core
npm ERR!   dev @babel/core@"7.0.0" from the root project
npm ERR!   peer @babel/core@"^7.0.0-0" from @babel/register@7.0.0
npm ERR!   node_modules/@babel/register
npm ERR!     dev @babel/register@"7.0.0" from the root project
npm ERR!   62 more (@vue/cli-plugin-babel, babel-core, babel-loader, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @babel/core@"^7.4.0-0" from @babel/helper-define-polyfill-provider@0.3.2
npm ERR! node_modules/babel-plugin-polyfill-corejs2/node_modules/@babel/helper-define-polyfill-provider
npm ERR!   @babel/helper-define-polyfill-provider@"^0.3.2" from babel-plugin-polyfill-corejs2@0.3.2
npm ERR!   node_modules/babel-plugin-polyfill-corejs2
npm ERR!     babel-plugin-polyfill-corejs2@"^0.3.2" from @babel/plugin-transform-runtime@7.18.10
npm ERR!     node_modules/@babel/plugin-transform-runtime
npm ERR!       @babel/plugin-transform-runtime@"^7.4.0" from @vue/babel-preset-app@3.12.1
npm ERR!       node_modules/@vue/babel-preset-app
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See \node_cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!    \Nodejs\node_cache\_logs\2022-08-04T01_17_30_442Z-debug.log

Process finished with exit code 1

在这里插入图片描述
然后更新项目包
在这里插入图片描述
这样子重新启动项目就可以啦
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值