Closed bweston92 closed 6 months ago
Any fix yet?!
@mo-fouad no, do you have the same issue?
Also getting the same issue
Update : It got fixed for me. Issue was in react-native-safe-area-context pakage. If anybody using this pakage please update it . It might solve the error for you. Also run this line in browser to get the full stack trace http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true it will give you the exact line where error is occurring. Thanks
Thank you for your help @vipulSoni458
I managed to fix this particular error with the export statements by removing other Babel plugins and just using the new preset.
This change fixed the problem for me:
- presets: [
- 'module:@react-native/babel-preset',
- ['@babel/preset-env', {targets: {node: 'current'}}],
- '@babel/preset-typescript',
- ],
+ presets: ['module:@react-native/babel-preset'],
This change fixed the problem for me:
- presets: [ - 'module:@react-native/babel-preset', - ['@babel/preset-env', {targets: {node: 'current'}}], - '@babel/preset-typescript', - ], + presets: ['module:@react-native/babel-preset'],
this worked for me too, thanks
Update : It got fixed for me. Issue was in react-native-safe-area-context pakage. If anybody using this pakage please update it . It might solve the error for you. Also run this line in browser to get the full stack trace http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true it will give you the exact line where error is occurring. Thanks
I would recommend to change the query parameter minify=true, this will show you a JSON with the exact error, it worked for me, with minify=false doesn't show the error
None of the above are working for me :(
For me, it's because my project had a couple of .tsx file (i copied from some where), and this needs to have typescript installed, but my project didn't. I just turned .tsx file to .js file, and the error is resolved.
Facing same issue, none of the solution worked for me
None of this worked for me
I removed the "@babel/plugin-transform-modules-commonjs" library and it worked.
Environment
Things I’ve done to figure out my issue
Upgrading version
0.73.1
Description
The generated JS bundle has
export
statements inside of functions which appears not to work.Logs
When I build for iOS device plugged in I get these errors.
When I build for a simulator I get the following: