当我运行react-native run-ios
时,我的应用可以正确运行,但是当我执行react-native run-android
时,我会收到一条错误消息:
.../node_modules/react-native/Libraries/ART/ReactNativeART.js: Missing class properties transform.
看来通天塔出了什么问题?
我的.babelrc
是这样的:
{
"passPerPreset": true,
"plugins": [
"transform-class-properties",
"transform-inline-environment-variables"
],
"presets": [
"react-native"
]
}
和package.json
中的babel软件包是:
"devDependencies": {
"babel-eslint": "^8.0.2",
"babel-plugin-remove-comments": "^2.0.0",
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
"babel-preset-react-native": "^4.0.0",
"babel-jest": "23.0.1",
"babel-plugin-transform-class-properties": "6.24.1",
}
有人知道什么地方可能出问题吗?