我在 react native 中遇到未捕获的参考错误,为什么会这样?我能够成功构建,但捆绑器显示此错误。我该如何解决?
注意:我使用的是 Windows 10
截屏:
包.json:
{
"name": "rchampz",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"lodash": "^4.17.11",
"moment": "^2.22.2",
"react": "16.5.0",
"react-native": "0.57.0",
"react-native-dash": "^0.0.9",
"react-native-dropdownalert": "^3.5.0",
"react-native-material-dropdown": "^0.11.1",
"react-native-modal-datetime-picker": "^6.0.0",
"react-native-paper": "^2.0.1",
"react-native-render-html": "^3.10.0",
"react-native-timeline-theme": "^0.0.9",
"react-native-vector-icons": "^5.0.0",
"react-navigation": "^2.14.2",
"react-redux": "^5.0.7",
"redux": "^4.0.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"react-test-renderer": "16.5.0"
},
"jest": {
"preset": "react-native"
}
}
.babelrc :
{
"presets": ["module:react-native"]
}