npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @vue-office/docx@1.3.0
npm ERR! Found: vue-demi@0.14.6
npm ERR! node_modules/vue-demi
npm ERR! vue-demi@“^0.14.6” from the root project
npm ERR! vue-demi@“*” from @vueuse/core@9.13.0
npm ERR! node_modules/@vueuse/core
npm ERR! @vueuse/core@“^9.1.0” from element-plus@2.4.1
npm ERR! node_modules/element-plus
npm ERR! element-plus@“^2.4.0” from the root project
npm ERR! 1 more (vcrontab-3)
npm ERR! 2 more (@vueuse/shared, pinia)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue-demi@“^0.13.11” from @vue-office/docx@1.3.0
npm ERR! @vue-office/docx@“^1.3.0” from the root project
npm ERR!
npm ERR! Conflicting peer dependency: vue-demi@0.13.11
npm ERR! node_modules/vue-demi
npm ERR! peer vue-demi@“^0.13.11” from @vue-office/docx@1.3.0
npm ERR! node_modules/@vue-office/docx
npm ERR! @vue-office/docx@“^1.3.0” from the root project
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!
npm ERR! For a full report see:
npm ERR! C:\Users\Administrator\AppData\Local\npm-cache_logs\2023-10-19T07_38_28_124Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: C:\Users\Administrator\AppData\Local\npm-cache_logs\2023-10-19T07_38_28_124Z-debug-0.log
PS F:\CodeDemo1\Admin.NET\Web> pnpm install
pnpm : 无法将“pnpm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 2
- pnpm install
-
- CategoryInfo : ObjectNotFound: (pnpm:String) [], CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException
可能是npm版本问题报错
解决方法:
在命令后面加上–legacy-peer-deps
–legacy-peer-deps的作用
在NPM v7中,现在默认安装peerDependencies。
在很多情况下,这会导致版本冲突,从而中断安装过程。文章来源:https://www.toymoban.com/news/detail-722235.html
–legacy-peer-deps标志是在v7中引入的,目的是绕过peerDependency自动安装;它告诉 NPM 忽略项目中引入的各个modules之间的相同modules但不同版本的问题并继续安装,保证各个引入的依赖之间对自身所使用的不同版本modules共存。文章来源地址https://www.toymoban.com/news/detail-722235.html
到了这里,关于npm 执行命令时报错npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!