reactjs - 如何在反应原生应用程序中解决此错误?
问题描述
现在我正在尝试制作一个反应原生和博览会的应用程序。昨天,我很好,但今天当我开始世博会时,我得到了这个错误。
类型错误:未定义不是对象(评估“this._callListeners.bind”)
我认为这个问题是基于 react-navigation、expo 或其他版本。
这是我下面的 package.json
"dependencies": {
"@expo/vector-icons": "^9.0.0",
"expo": "^32.0.0",
"expo-cli": "^2.11.9",
"firebase": "^4.12.1",
"mobx": "^5.8.0",
"mobx-react": "^5.4.3",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-native-maps": "^0.23.0",
"react-native-modal": "^7.0.2",
"react-native-vector-icons": "^6.1.0",
"react-navigation": "^3.4.1"
},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.3.4",
"@babel/plugin-proposal-decorators": "^7.3.0",
"@babel/preset-react": "^7.0.0",
"babel-eslint": "^10.0.1",
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"babel-preset-expo": "^5.0.0",
"babel-preset-mobx": "^2.0.0",
"babel-preset-react-native": "^4.0.1",
"directory": "^0.1.0",
"eslint": "^5.12.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.12.3",
"metro-react-native-babel-preset": "^0.53.0"
},
解决方案
在我的应用程序无缘无故开始显示此错误后,我花了几个小时在谷歌上搜索此问题的解决方案,但没有任何效果。最后我尝试做expo start -c
,因为我记得在Expo v33 升级文档中提到过。我的错误消失了。
推荐阅读
- javascript - Annyang.js 在测试中工作,但之后它似乎没有连接
- mongodb - Mongodb - 带有现在已经过去的日期字段的流文档
- c - 使用mingw64在linux中为windows编译gtk3应用程序
- facebook - FB Messenger 向 Webhook 发送多条消息
- pdf - Pandoc URL 锚字符编码
- react-native - react-native FlatList 滚动到底部的聊天应用程序
- mongodb - MongoDB:批量创建或更新
- java - Quarkus 原生镜像是否支持 java 标准包?
- r - 我们如何根据树状图中形成的集群将 hclust 的标签放在表中
- python - 亚马逊应用商店没有回应 ETag