ruoyi-ui npm install code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree

問題

ruoyi框架 ui 安裝時出現錯誤(npm install)

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"7.15.0" from the root project
npm ERR!   peer eslint@">= 1.6.0" from @vue/[email protected]
npm ERR!   node_modules/@vue/cli-plugin-eslint
npm ERR!     dev @vue/cli-plugin-eslint@"4.4.6" from the root project
npm ERR!   2 more (babel-eslint, eslint-plugin-vue)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@">=1.6.0 <7.0.0" from [email protected]
npm ERR! node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader
npm ERR!   eslint-loader@"^2.2.1" from @vue/[email protected]
npm ERR!   node_modules/@vue/cli-plugin-eslint
npm ERR!     dev @vue/cli-plugin-eslint@"4.4.6" 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\研\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\研\AppData\Local\npm-cache\_logs\2021-11-24T05_55_23_672Z-debug.log

原因

npm版本問題, 當前npm版本7.18.1, 查閱資料後說是因爲npm7.x的版本比npm6.x更嚴格

解決辦法

npm i --legacy-peer-deps

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章