react-native - React Native,缺少类属性转换
问题描述
当我运行时react-native run-ios
,我的应用程序运行正常,但是当我运行时,react-native run-android
我收到一条错误消息:
.../node_modules/react-native/Libraries/ART/ReactNativeART.js: Missing class properties transform.
所以看起来 babel 有问题?
我.babelrc
的是这样的:
{
"passPerPreset": true,
"plugins": [
"transform-class-properties",
"transform-inline-environment-variables"
],
"presets": [
"react-native"
]
}
和里面的 babel 包package.json
是:
"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",
}
有谁知道可能出了什么问题?
解决方案
推荐阅读
- javascript - 如何在Angular4中检测父div而不是子div的焦点
- php - 更新数组中的 php 变量
- excel - 对甘特图中的不同规则使用 IF 条件
- php - 如何在 EC2 Linux 上执行 shell_exec
- sql - 一种行成列查看产品每月收入的有效方法
- powershell - 任何将多行 PowerShell 脚本转换为编码命令的程序?
- c - 如何让 fscanf 从 .csv 文件中读取,将逗号之间和每行中的每个部分读入字符串?
- html - 无法使具有动态高度的容器可滚动
- javascript - 无头 Chrome 和 document.location.href 更改
- python-3.x - 从电子邮件中删除重复项并导出到 csv