I just updated the React Native from 0.55 to 0.56.
However, when I tried to run the code (react-native run-android OR run-ios), bundling stops to this point:
Loading dependency graph, done.
error: bundling failed: TypeError: Cannot read property 'filename' of undefined
at PluginPass.JSXOpeningElement ({path_to_my_project}/react-native/node_modules/babel-plugin-transform-react-jsx-source/lib/index.js:32:39)
This is my .babelrc:
{
"presets": [
"react-native"
],
"env": {
"development": {
"plugins": [
"transform-react-jsx-source"
]
}
}
}
and package.json
"dependencies": {
"babel-jest": "23.4.2",
"babel-preset-react-native": "5.0.2",
"react": "16.4.1",
"react-native": "0.56.0",
}
I have deleted node_modules folder and installed packages again, but no luck there.
Any suggestions what to do? Any help would be appreciated!
I removed
"env": {
"development": {
"plugins": [
"transform-react-jsx-source"
]
}
}
from .babelrc and it worked.
So that my .babelrc at the end looked like
{ "presets": ["react-native"] }
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