PS C:\Users\chand\OneDrive\Desktop\react\amazon-clone> npm install @material-ui/icons
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: amazon-clone@0.1.0
npm ERR! Found: react@18.1.0
npm ERR! node_modules/react
npm ERR! react@"^18.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4
npm ERR! node_modules/@material-ui/core
npm ERR! peer @material-ui/core@"^4.0.0" from @material-ui/icons@4.11.3
npm ERR! node_modules/@material-ui/icons
npm ERR! @material-ui/icons@"*" 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\chand\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\chand\AppData\Local\npm-cache\_logs\2022-05-11T20_28_09_686Z-debug-0.log
PS C:\Users\chand\OneDrive\Desktop\react\amazon-clone>
uj5u.com熱心網友回復:
您已添加amazon-clone為依賴項,這需要react. 您已添加[email protected],但它需要錯誤訊息中指定的 v16 或 17。
例如
npm install react@17.0.0
他們顯然還沒有發布對 v18 的支持,或者它可能在開發分支上。
只需選擇符合要求的適當版本即可。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/472503.html
標籤:节点.js
