在使用各种工具清理项目之后,我消除了另一个错误,它导致项目在构建过程中失败。(
react-native run-ios
yarn upgrade
yarn cache clean
react-native upgrade
rm -rf ios/build/; kill $(lsof -t -i:8081); react-native run-ios
https://github.com/babel/babel-loader/issues/195
为什么我得到一个模糊的错误说我有一个未处理的JS异常?
{
"presets": ["react-native"],
"plugins": ["transform-decorators-legacy",
"transform-async-generator-functions",
"transform-object-rest-spread",
"transform-class-properties",
"transform-regenerator"]
}
react-native info
Environment:
OS: macOS High Sierra 10.13.5
Node: 9.5.0
Yarn: 1.6.0
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.4.1 Build version 9F2000
Android Studio: 3.1 AI-173.4670197
Packages: (wanted => installed)
react: ^16.3.0-alpha.1 => 16.4.1
react-native: 0.54.4 => 0.54.4
{
"name": "FluxRN",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"mobx": "^5.0.2",
"mobx-react": "^5.2.3",
"moment": "^2.22.0",
"native-base": "^2.5.2",
"react": "^16.3.0-alpha.1",
"react-native": "0.54.4",
"react-native-vector-icons": "^4.6.0",
"react-navigation": "^1.5.9"
},
"devDependencies": {
"babel-jest": "22.4.3",
"babel-plugin-transform-async-generator-functions": "^6.24.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-regenerator": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-react-native": "4.0.0",
"jest": "22.4.3",
"react-test-renderer": "^16.3.0-alpha.1"
},
"jest": {
"preset": "react-native"
}
}