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。
在很多情况下,这会导致版本冲突,从而中断安装过程。
–legacy-peer-deps标志是在v7中引入的,目的是绕过peerDependency自动安装;它告诉 NPM 忽略项目中引入的各个modules之间的相同modules但不同版本的问题并继续安装,保证各个引入的依赖之间对自身所使用的不同版本modules共存。