Sad*_*and 4 babel reactjs babeljs react-native react-native-android
我开始弹出世博会,经过这么多的努力,我能够解决所有构建问题.当我使用'sudo react-native run-android'运行应用程序时,我开始收到以下错误
错误:
The development server returned response code 500
Bundling `index.android.js` [development, non-minified, hmr disabled]
0.0% (0/1), failed.
error: bundling failed: "TransformError:
/Development/SourceCode/MobileApp/index.android.js:
Couldn't find preset \"babel-preset-react-native-stage-0/decorator-support\" relative to directory \"/Development/SourceCode/MobileApp\""
Run Code Online (Sandbox Code Playgroud)
我尝试了在github和SO中给出的几乎所有可能的修复
.babelrc
文件看起来像这样
{
"presets": [
"react-native",
"babel-preset-react-native-stage-0/decorator-support"
],
"env": {
"development": {
"plugins": [
"transform-react-jsx-source"
]
}
}
}
Run Code Online (Sandbox Code Playgroud)
这些修复都不适合我.使用babel-preset-react-native@2.1.0
也没有解决问题,因为这是主要的修复.
尝试使用正常的babel预设0:https://babeljs.io/docs/plugins/preset-stage-0
所以
"presets": ["react-native", "stage-0"]
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4959 次 |
最近记录: |