npm下载报错npm ERR code ERESOLVE

简介: npm下载报错npm ERR code ERESOLVE

报错:


npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @vue/eslint-config-standard@6.1.0
npm ERR! Found: eslint-plugin-vue@8.7.1
npm ERR! node_modules/eslint-plugin-vue
npm ERR!   peer eslint-plugin-vue@"^8.0.1" from @vue/eslint-config-typescript@9.1.0
npm ERR!   node_modules/@vue/eslint-config-typescript
npm ERR!     dev @vue/eslint-config-typescript@"^9.1.0" from the root project
npm ERR!   dev eslint-plugin-vue@"^8.0.3" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint-plugin-vue@"^7.0.0" from @vue/eslint-config-standard@6.1.0
npm ERR! node_modules/@vue/eslint-config-standard
npm ERR!   dev @vue/eslint-config-standard@"^6.1.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: eslint-plugin-vue@7.20.0    
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共存。

相关文章
|
3月前
npm run dev启动报错:Error: Cannot find module 'semver'
npm run dev启动报错:Error: Cannot find module 'semver'
70 0
|
20天前
|
JavaScript
报错:npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
报错:npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
|
1月前
|
缓存 资源调度
解决安装依赖时报错:npm ERR! code ERESOLVE
解决安装依赖时报错:npm ERR! code ERESOLVE
176 0
解决安装依赖时报错:npm ERR! code ERESOLVE
|
2月前
|
缓存 JavaScript 测试技术
软件测试/测试开发|npm常见报错解析
软件测试/测试开发|npm常见报错解析
45 0
|
2月前
|
Python
NPM【问题 01】npm i node-sass@4.14.1报错not found: python2及Cannot download问题处理
NPM【问题 01】npm i node-sass@4.14.1报错not found: python2及Cannot download问题处理
43 0
|
2月前
|
前端开发 JavaScript
Vue中引入swiper插件报错:To install it, you can run: npm install --save swiper/css/swiper.css
Vue中引入swiper插件报错:To install it, you can run: npm install --save swiper/css/swiper.css
|
2月前
npm ERR! code ENOENT npm ERR! syscall open npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file
npm ERR! code ENOENT npm ERR! syscall open npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file
|
2月前
|
JavaScript
Vue报错:npm run start npm ERR! missing script: start
Vue报错:npm run start npm ERR! missing script: start
|
3月前
cnpm i安装报错-Install fail! Error: Unsupported URL Type: npm:vue-loader@^15.9.7
cnpm i安装报错-Install fail! Error: Unsupported URL Type: npm:vue-loader@^15.9.7
74 1
|
2月前
|
JavaScript
Nodejs 第七章(发布npm包)
Nodejs 第七章(发布npm包)
18 0