這是我嘗試安裝/卸載軟體包后得到的結果:
(base) vivekrk@Viveks-MacBook-Air PUPA % npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-navigation-drawer@1.4.0
npm ERR! Found: react-native-screens@3.18.0
npm ERR! node_modules/react-native-screens
npm ERR! react-native-screens@"^3.18.0" from the root project
npm ERR! peer react-native-screens@">= 3.0.0" from @react-navigation/native-stack@6.9.0
npm ERR! node_modules/@react-navigation/native-stack
npm ERR! @react-navigation/native-stack@"^6.9.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native-screens@"^1.0.0 || ^1.0.0-alpha" from react-navigation-drawer@1.4.0
npm ERR! node_modules/react-navigation-drawer
npm ERR! react-navigation-drawer@"^1.4.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react-native-screens@1.0.0-alpha.23
npm ERR! node_modules/react-native-screens
npm ERR! peer react-native-screens@"^1.0.0 || ^1.0.0-alpha" from react-navigation-drawer@1.4.0
npm ERR! node_modules/react-navigation-drawer
npm ERR! react-navigation-drawer@"^1.4.0" 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 /Users/vivekrk/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/vivekrk/.npm/_logs/2022-10-10T04_17_37_997Z-debug-0.log
我也無法運行npx react-native start
這是在我安裝了幾個 npm 包并且沒有用所以我卸載之后發生的。但在那之后我無法安裝新的軟體包。
請解決我的問題!!
uj5u.com熱心網友回復:
也許你有依賴沖突,所以你可以嘗試運行它--force
完整命令:
npm install --force
或者您可以嘗試降級您的nodejs版本。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/513522.html
