当我尝试安装 npm 时出现错误

问题描述 投票:0回答:1
npm install
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @expo/[email protected]
npm error Found: [email protected]
npm error node_modules/expo
npm error   expo@"~51.0.6" from the root project
npm error   peer expo@"*" from [email protected]
npm error   node_modules/expo-application
npm error     peer expo-application@">=5" from @clerk/[email protected]
npm error     node_modules/@clerk/clerk-expo
npm error       @clerk/clerk-expo@"^0.20.10" from the root project
npm error     expo-application@"~5.9.0" from [email protected]
npm error     node_modules/expo-auth-session
npm error       expo-auth-session@"~5.5.2" from the root project
npm error       1 more (@clerk/clerk-expo)
npm error     1 more (expo-notifications)
npm error   21 more (expo-asset, expo-constants, expo-crypto, ...)
npm error
npm error Could not resolve dependency:
npm error peer expo@"^49.0.7 || ^50.0.0-0" from @expo/[email protected]
npm error node_modules/@expo/webpack-config
npm error   @expo/webpack-config@"~19.0.1" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/expo
npm error   peer expo@"^49.0.7 || ^50.0.0-0" from @expo/[email protected]
npm error   node_modules/@expo/webpack-config
npm error     @expo/webpack-config@"~19.0.1" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error C:\Users\Test\AppData\Local\npm-cache\_logs\2024-05-15T00_18_13_568Z-eresolve-report.txt

npm error A complete log of this run can be found in: C:\Users\Test\AppData\Local\npm-cache\_logs\2024-05-15T00_18_13_568Z-debug-0.log

我删除了节点模块,当我尝试升级expo时,我得到了这个

reactjs windows go expo native
1个回答
-1
投票

首先通过命令行检查您的节点版本:node -v 然后它将显示您的节点版本并尝试再次安装。你可以尝试:npm install --force

© www.soinside.com 2019 - 2024. All rights reserved.