在npm install 时,出现以下的报错了 ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: vue-element-admin@3.10.0 npm ERR! Found: vue@2.5.17 npm ERR! node_modules/vue npm ERR! vue@"2.5.17" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer vue@"^2.6.9" from vue-json-viewer@2.2.22 npm ERR! node_modules/vue-json-viewer npm ERR! vue-json-viewer@"^2.2.14" from the root 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\Administrator\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\Administrator\AppData\Local\npm-cache_logs\2024-09-01T07_44_08_152Z-debug-0.log
原因:node 的版本太高了,我现在的node 版本是18.12.0了
只需改成低版本的就可以了
最新评论