npm ERR! ERESOLVE could not resolve 解决方案

 

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: element-ui@2.15.3
npm ERR! Found: vue@3.0.5
npm ERR! node_modules/vue
npm ERR!   vue@"^3.0.0" from the root project
npm ERR!   peerOptional vue@"^2 || ^3.0.0-0" from @vue/babel-preset-app@4.5.10
npm ERR!   node_modules/@vue/babel-preset-app
npm ERR!     @vue/babel-preset-app@"^4.5.10" from @vue/cli-plugin-babel@4.5.10
npm ERR!     node_modules/@vue/cli-plugin-babel
npm ERR!       dev @vue/cli-plugin-babel@"~4.5.0" from the root project
npm ERR!   7 more (@vue/compiler-sfc, @vue/test-utils, vant, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^2.5.17" from element-ui@2.15.3
npm ERR! node_modules/element-ui
npm ERR!   element-ui@"^2.15.3" from the root project
npm ERR! Conflicting peer dependency: vue@2.7.3
npm ERR! node_modules/vue
npm ERR!   peer vue@"^2.5.17" from element-ui@2.15.3
npm ERR!   node_modules/element-ui
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! See C:\xxx\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\xxx\AppData\Local\npm-cache\_logs\2022-07-07T05_52_22_137Z-debug-0.log
npm ERR! Cannot read properties of null (reading 'package')

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\xxx\AppData\Local\npm-cache\_logs\2022-07-07T05_52_53_892Z-debug-0.log
PS D:\xxx> npm i
npm ERR! Cannot read properties of null (reading 'package')

出现这种情况,删除node_modules文件夹,使用 npm i 命令执行 依赖安装。别使用cnpm了。

 

npm启动项目出现gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer错误信息的解决方案

posted @ 2022-07-07 14:02  星小梦  阅读(8194)  评论(0编辑  收藏  举报