npm 安裝@material-ui/core @material-ui/icons @material-ui/labs @react-google-maps/api axios google-map-react
npm 錯(cuò)誤!代碼 ERESOLVE npm 錯(cuò)誤! ERESOLVE 無法解決 npm 錯(cuò)誤! npm 錯(cuò)誤! While resolving: @testing-library/[email?protected] npm 錯(cuò)誤! Found: [email?protected] npm 錯(cuò)誤! node_modules/react npm 錯(cuò)誤! npm 錯(cuò)誤! For a full report see: npm 錯(cuò)誤! C:\Users\SENSA\AppData\Local\npm-cache_logs\2023-04-07T05_56_29_194Z-eresolve-report.txt
npm 錯(cuò)誤! A complete log of this run can be found in: npm 錯(cuò)誤! C:\Users\SENSA\AppData\Local\npm-cache_logs\2023-04-07T05_56_29_194Z-debug-0.log
可能你的npm版本不合適。您可以嘗試以下步驟:
使用--legacy-peer-deps
安裝依賴項(xiàng),執(zhí)行npm install @material-ui/core @material-ui/icons @material-ui/labs @react -google-maps/api axios google -map-react --legacy-peer-deps
。
如果仍然報(bào)錯(cuò),請(qǐng)刪除所有node_modules,然後再次執(zhí)行該指令。
如果仍然報(bào)錯(cuò),請(qǐng)使用 npm --version
檢查您的 npm 版本,然後更新到最新的 npm 版本即可解決此問題。