简体   繁体   English

错误:“package.json”中的 react-native 版本与“node_modules”中安装的版本不匹配

[英]Error: react-native version in "package.json" doesn't match the installed version in "node_modules"

I ran react-native-git-upgrade so I can run react-native run-android later on to build my app on my device but an error message appeared.我运行了react-native-git-upgrade所以我可以稍后运行react-native run-android来在我的设备上构建我的应用程序,但出现了一条错误消息。

The error says:错误说:

Error: react-native version in "package.json" (https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz) doesn't match the installed version in "node_modules" (0.57.1).

I tried running 'npm install' again but the error still occurs.我再次尝试运行“npm install”,但仍然出现错误。

You are using Expo.您正在使用世博会。 You can't upgrade like this way.你不能这样升级。 Expo using custom version of React Native.Check this. Expo 使用自定义版本的 React Native。检查这个。 https://docs.expo.io/versions/latest/workflow/upgrading-expo-sdk-walkthrough https://docs.expo.io/versions/latest/workflow/upgrading-expo-sdk-walkthrough

and you are already using latest version of Expo.并且您已经在使用最新版本的 Expo。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 React Native - 从 package.json 到 android 构建清单的自动版本名称 - React Native - Automatic version name from package.json to android build manifest adb服务器版本(36)与该客户端(39)不匹配。不使用Genymotion。 尝试在移动设备上渲染本机项目 - adb server version (36) doesn't match this client (39) Not using Genymotion. Trying to render react-native project on mobile 如何解决此错误:“ ../node_modules/react-native/scripts/third-party/glog-0.3.5/test-driver'。无法遵循符号链接 - How to fix this error : "../node_modules/react-native/scripts/third-party/glog-0.3.5/test-driver'. Couldn't follow symbolic link Adb服务器版本与此客户端不匹配[React Native] - Adb Server Version Doesn't Match This Client [React Native] React-Native运行android错误Java不是增量的,而React-Native升级版本与node_module不匹配 - React-Native run android error java is not incremential and react-native upgrade dismatch version with node_module 查看最低Android(Sdk)版本 react-native npm package - Check the minimum Android(Sdk) version of react-native npm package 从node_modules目录的React-Native Android导入不起作用 - React-Native Android import from node_modules directory does not working 在 react-native 项目中找不到 metro-config node_modules - metro-config node_modules not found in react-native project React-Native 版本 0.60.3 中的版本不匹配 - Version Mismatch in React-Native Version 0.60.3 React-Native-Reanimated: 错误: node_modules\react-native-reanimated\src\index.ts: - React-Native-Reanimated: error: node_modules\react-native-reanimated\src\index.ts:
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM