I started ejecting expo, after so much struggle I could able to solve all build issues. When I run the app using 'sudo react-native run-android' I started getting following error
Error:
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\""
I tried almost all possible fixes given in github and SO
.babelrc
file looks like this
{
"presets": [
"react-native",
"babel-preset-react-native-stage-0/decorator-support"
],
"env": {
"development": {
"plugins": [
"transform-react-jsx-source"
]
}
}
}
None of those fixes worked for me. using [email protected]
also didn't fix the issue because that was the major fix.
Try to use normal babel preset 0 as per: https://babeljs.io/docs/plugins/preset-stage-0
so
"presets": ["react-native", "stage-0"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With