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、函數(shù)、腳本文件或可運行程序的名稱。請檢查名稱的拼寫,如果包括路徑,請確保路徑正確,然后再試一次。
所在位置 行:1 字符: 2
- pnpm install
-
- CategoryInfo : ObjectNotFound: (pnpm:String) [], CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException
可能是npm版本問題報錯
解決方法:
在命令后面加上–legacy-peer-deps
–legacy-peer-deps的作用
在NPM v7中,現(xiàn)在默認安裝peerDependencies。
在很多情況下,這會導(dǎo)致版本沖突,從而中斷安裝過程。文章來源:http://www.zghlxwxcb.cn/news/detail-722235.html
–legacy-peer-deps標(biāo)志是在v7中引入的,目的是繞過peerDependency自動安裝;它告訴 NPM 忽略項目中引入的各個modules之間的相同modules但不同版本的問題并繼續(xù)安裝,保證各個引入的依賴之間對自身所使用的不同版本modules共存。文章來源地址http://www.zghlxwxcb.cn/news/detail-722235.html
到了這里,關(guān)于npm 執(zhí)行命令時報錯npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!