-
Notifications
You must be signed in to change notification settings - Fork 93
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
main.jsbundle does not exist. This must be a bug with #1509
Comments
There are few potential reasons why this could happen:
If the above does not help please provide link to non local build where this happens |
I'm seeing the same error and I neither have typescript errors nor ejected unintentionally. The error started appearing after upgrading Expo v0.46 -> 0.47 and I'm now unable to build the app on an M1 Mac. Can't find any useful info in XCode logs to help me debug the issue. |
Upon further digging into the xcode logs I found something: error hooks/useFilters.ts: Unexpected token name «_000», expected punc «,» in file hooks/useFilters.ts at 27:11.
Error: Unexpected token name «_000», expected punc «,» in file hooks/useFilters.ts at 27:11
at minifyCode (/Users/expo/workingdir/build/app/node_modules/metro-transform-worker/src/index.js:101:13)
at transformJS (/Users/expo/workingdir/build/app/node_modules/metro-transform-worker/src/index.js:319:28)
at transformJSWithBabel (/Users/expo/workingdir/build/app/node_modules/metro-transform-worker/src/index.js:410:16)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.transform (/Users/expo/workingdir/build/app/node_modules/metro-transform-worker/src/index.js:571:12) I checked this useFilters file, but no issue in sight within the editor or when running the app in debug mode, I suspect something breaks during minification cc @wkozyra95 |
@dancamdev I'm not sure if it's bug in react-native or expected behavior, either way not really EAS issue. To fix that you just need to remove underscores from number literals. e.g. You probably have sth like |
Same error after upgrade here.
|
same for me |
I solved my problem by looking at the logs when the app starts on an iPhone. There I saw it tried to import something with errors (SVG related). So I removed |
I'm also seeing this problem and am using various @FortAwesome SVG icons in my project. I'm using them in quite a lot of places though so I haven't removed them to be able to verify this is the issue. May I ask where you saw the logs which mentioned an SVG related error? When I start my app using either expo go or a development build (both on the simulator) I don't see any errors. |
I am still seeing this problem. I have tried backtracking my package.json and removing everything I can think of. No love. |
I was able to resolve my issue. Instead of removing font awesome, I actually used deep imports. So this:
Became this: I then repeated this for all my font awesome icon usage across my app. I guess this way, it only adds the icons we're using, rather than all of them. After this, my app built successfully. |
I was seeing this problem as well but seem to have found a solution. I commented out aws-exports.js in my .gitignore. I am using AWS amplify on my project. This file was not being included when uploaded to eas since it was in .gitignore. You can review your xcode log for more details - this is where I saw the error "error Unable to resolve module ./src/aws-exports from /Users/expo/workingdir/build/App.js". I did also downgrade the SDK to 46 but I don't think that was the solution. |
I saw them in the logs on device; after trying to start the build that EAS produced. E.g. connect to the iPhone and collect logs. |
This was it for me. Thanks @cmeyer90 ! |
Same @tannerabread |
I have fixed this just by deleting all files/folders related to this project inside Archives and DerivedData on: Hope it helps! I took a long time to find this, I was always creating a new project and copying files over. Good luck 👋🏽 |
I was wondering how this guy/gal saw the xocde logs, I am new to this whole thing. So I submitted the build to EAS (instead of locally building as it was failing and I didn't know how to get xcode logs, when building online it just lets you download those logs) - then I downloaded the expo logs and voila I saw the output of the script with error that was causing a failure in building main.jsbundle-
Turns out the docs mention this exact error caused by adding
I removed index.js from .gitignore and local buils + remote build suceeded. |
This worked for me |
This happens only when building the app with EAS namely during the fast lane step.
I've seen it in other react native related issues and they suggested to edit some files in Xcode, but I would like to keep the project expo managed, so I'm not sure how to fix it.
Here's part of the build log, I think is most relevant:
The text was updated successfully, but these errors were encountered: