“React-Native 0.16.0和0.17.0”中的“babelHelpers.asyncToGenerator不是一个函数”

我将React-Native从0.14.0更新到了0.16.0,从现在开始,我在运行时遇到错误:

https://cloud.githubusercontent.com/assets/3106676/11873009/b5b3aee2-a4d8-11e5-96db-831de137af06.png

https://cloud.githubusercontent.com/assets/3106676/11873609/c1cc1c34-a4db-11e5-981f-8d7d8c653819.png

这里是npm dependencies

 "dependencies": { "async": "^1.5.0", "immutable": "^3.7.6", "react-native": "^0.16.0", "react-native-contacts": "../../react-native-contacts", "react-native-contacts-rx": "^1.0.1", "react-native-gifted-messenger": "0.0.7", "react-native-i18n": "0.0.6", "react-redux": "^4.0.1", "redux": "^3.0.5", "rx": "^4.0.7" }, "devDependencies": { "babel-eslint": "^5.0.0-beta6", "eslint": "^1.10.3", "eslint-config-airbnb": "^2.1.1", "eslint-plugin-react": "^3.11.3", "events": "^1.1.0", "flux": "^2.1.1", "keymirror": "^0.1.1", "lodash": "^3.10.1", "redux-devtools": "^3.0.0" } 

和我的.babelrc文件:

 { "retainLines": true, "compact": true, "comments": false, } 

有什么build议么?

问题在@Jean Lebrument提交的问题上得到了回答。 在这里为像我这样的绊倒者提出答案…

https://github.com/facebook/react-native/issues/4844

这个问题很可能在你的.babelrc文件中。 如果遇到此问题,请比较您的.babelrc文件以回应本机默认的问题 。 尝试删除文件或build立一个默认的,添加你需要的function。

确保重新启动您的打包程序,停止并重新运行您的项目。

Interesting Posts