[email protected] npm ERR Found: eslint ...">

当前位置:网站首页>npm下载报错npm ERR code ERESOLVE

npm下载报错npm ERR code ERESOLVE

2022-06-23 06:19:00 Aaron Con

报错:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @vue/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint-plugin-vue
npm ERR!   peer [email protected]"^8.0.1" from @vue/[email protected]
npm ERR!   node_modules/@vue/eslint-config-typescript
npm ERR!     dev @vue/[email protected]"^9.1.0" from the root project
npm ERR!   dev [email protected]"^8.0.3" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer [email protected]"^7.0.0" from @vue/[email protected]
npm ERR! node_modules/@vue/eslint-config-standard
npm ERR!   dev @vue/[email protected]"^6.1.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]    
t project
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 C:\Users\danxibao\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:\Users\danxibao\AppData\Local\npm-cache\_logs\2022-05-29T07_02_09_565Z-debug-0.log

解决:

npm下载时
--legacy-peer-deps
在NPM v7中,现在默认安装peerDependencies。

在很多情况下,npm版本问题会导致下载冲突,从而中断安装过程。

–legacy-peer-deps标志是在v7中引入的,目的是绕过peerDependency自动安装;它告诉 NPM 忽略项目中引入的各个modules之间的相同modules但不同版本的问题并继续安装,保证各个引入的依赖之间对自身所使用的不同版本modules共存。

原网站

版权声明
本文为[Aaron Con]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_47979372/article/details/125031241