javascript expo 已过期 卸载并再次运行以升级

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/54251369/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 10:22:43  来源:igfitidea点击:

expo is out of date uninstall and run again to upgrade

javascriptreact-nativeexpo

提问by Andrew

when running my app on ios simulator, I am getting the following error This version of the Expo app is out of date. Uninstall the app and run again to upgrade.

在 ios 模拟器上运行我的应用程序时,出现以下错误 This version of the Expo app is out of date. Uninstall the app and run again to upgrade.

Here is how I tried to upgrade expo-cli yet not successful

这是我尝试升级 expo-cli 但未成功的方法

  1. npm update -g

  2. yarn add global expo-cli

  3. npm uninstall expo-cli
  4. npm cache clean --force
  5. yarn add global expo-cli
  1. npm update -g

  2. yarn add global expo-cli

  3. npm uninstall expo-cli
  4. npm cache clean --force
  5. yarn add global expo-cli

Here is app.json

这是 app.json

"expo": {
    "name": "firebase-reacte-native",
    "slug": "firebase-reacte-native",
    "privacy": "public",
    "sdkVersion": "32.0.0",
    "platforms": [
    ....

Here is package.json

这是 package.json

"dependencies": {
    "expo": "^32.0.0",
    "react": "16.5.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz"
  }

All I want to do is run ios-simulator without the error message on ios simulator as there was a problem loading the requested app. The experience you requested requires a newer version of the Expo Client app.

我想要做的就是运行 ios-simulator 而没有 ios 模拟器上的错误消息 there was a problem loading the requested app. The experience you requested requires a newer version of the Expo Client app.

回答by Andrew

The issue is to do with the app that is on the iOS simulator / device is out of date and is not compatible with the current version of Expo that you running.

问题与 iOS 模拟器/设备上的应用程序过时有关,并且与您运行的当前版本的 Expo 不兼容。

Delete the Expo app from the the iOS simulator and it should work, or install the latest update if you are on a device

从 iOS 模拟器中删除 Expo 应用程序,它应该可以工作,或者如果您在设备上安装最新的更新

https://github.com/expo/expo/issues/1595

https://github.com/expo/expo/issues/1595

One way to do it is with the simulator open is to Erase All Content and Settings. Then re-run npm start and the Expo App will be installed again on this device simulator.

一种方法是在模拟器打开的情况下将Erase All Content and Settings. 然后重新运行 npm start ,Expo App 将再次安装在此设备模拟器上。

enter image description here

在此处输入图片说明

回答by tlrmacl

Homebrew update sovled my probolem!

Homebrew 更新解决了我的问题!

brew upgrade node

brew upgrade node

回答by Kike Gamboa

Please, try this:

请试试这个:

1.- npm cache clean -f
2.- yarn upgrade
3.- npm upgrade
3.- npm install

If this doesn't work try edit package.json:

如果这不起作用,请尝试编辑package.json

{
  "react-native": "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz",
  "expo": "^34.0.1",
  "react": "16.8.3"
} 

Then

然后

npm install

let me know if this works for you

让我知道这是否适合你