package.json代码
"dependencies": {
"@babel/plugin-external-helpers": "^7.0.0",
"@types/events": "^1.2.0",
"@types/prop-types": "^15.5.5",
"@types/query-string": "^6.1.0",
"@types/react": "^16.4.14",
"@types/react-native": "^0.56.23",
"@types/react-native-drawer-layout": "^1.3.5",
"@types/react-navigation": "^2.0.21",
"antd-mobile-rn": "^2.2.1",
"axios": "^0.18.0",
"babel-plugin-import": "^1.9.1",
"events": "^3.0.0",
"mobx": "4.3.1",
"mobx-react": "^5.2.8",
"moment": "^2.22.2",
"query-string": "^6.1.0",
"react": "16.5.0",
"react-native": "0.57.0",
"react-native-image-zoom-viewer": "^2.2.18",
"react-native-keyboard-aware-scroll-view": "^0.7.2",
"react-native-simple-radio-button": "^2.7.3",
"react-native-swipeout": "^2.3.6",
"react-navigation": "^2.16.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.45.4",
"react-test-renderer": "16.5.0"
},
"jest": {
"preset": "react-native"
}
答案 0 :(得分:0)
检查您的.babelrc文件,它必须具有类似这样的内容
{
"presets": ["module:metro-react-native-babel-preset"]
}