-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Native Upgrade 0.72.5 -> 0.73.1 | export declaration must be at top level of module export default #254
Comments
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:
|
this worked for me too, 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 |
I removed the "@babel/plugin-transform-modules-commonjs" library and it worked. |
This worked for me. Had to delete package-lock.json and node_modules afterwards, but good find. |
In my case I had both |
Worked for me too. After 12 hours oof. I was mostly debugging through Expo Go, so I highly recommend that folks install Android Studio which helped get me the right stack trace to identify the issue and find this thread. |
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:
The text was updated successfully, but these errors were encountered: