Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native 世博会:Can';找不到需要的变量_React Native_Expo - Fatal编程技术网

React native 世博会:Can';找不到需要的变量

React native 世博会:Can';找不到需要的变量,react-native,expo,React Native,Expo,亲爱的社区: 我无法在网上找到解决问题的方法。我的错误如下: Can't find variable: require http://127.0.0.1:19001/node_modules/expo/AppEntry.bundle?platform=android&dev=true&minify=false&hot=false:5:24 global code@http://127.0.0.1:19001/node_modules/expo/AppEntry.bund

亲爱的社区:

我无法在网上找到解决问题的方法。我的错误如下:

Can't find variable: require

http://127.0.0.1:19001/node_modules/expo/AppEntry.bundle?platform=android&dev=true&minify=false&hot=false:5:24
global code@http://127.0.0.1:19001/node_modules/expo/AppEntry.bundle?platform=android&dev=true&minify=false&hot=false:701:3

两天前它运行得很好,而且(显然)从那以后我没有做任何改变

你知道它从哪里来吗

我正在使用:

  • 世博会~3.0.10
  • “本地反应”https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz"
非常基本的配置。我怀疑有什么配置失误

提前谢谢

问候,

纪尧姆

更新09-02-2020 4pm20:

  • 我试着清理缓存
  • 我试着换目录
  • 我尝试了
    expo init
    一个新的应用程序,导入前一个应用程序的源代码,安装依赖项,直到我运行
    expo start-c
    ,然后问题又出现了
  • 还在努力
更新时间:2020年2月9日晚上7点:

我终于成功了

  • 将expo cli更新至最新版本
  • 在另一个目录中初始化新的expo应用程序
  • 复制/粘贴源代码
  • 使用
    expo start-c
    而不是
    expo start
    ,以确保以下步骤中不涉及缓存
  • 逐个安装依赖项以确保没有问题
  • 最后测试应用程序

尝试添加,从您提到的文件中的“React”导入React require

是否尝试清除缓存我尝试过清理缓存。我试着查看代码中是否有任何要求。没有,谢谢你的回答。不幸的是,我没有任何。。。