-
Notifications
You must be signed in to change notification settings - Fork 24.2k
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 #32108
Comments
Have you found any solutions? This is only happening when running in release or staging mode, not debug. It's also happening when I archive as that is in release mode and preventing me from releasing an app update :( The error was introduced when I upgraded from react-native 0.61.5. Auto upgrade didn't work and I used the upgrade helper Environment:
|
I also encountered this error when making an archive build. 😔 Environmentnode: 14.17.6 |
@taduyde and @tonypangs did this issue also begin after upgrading react-native from an older version or is this happening fro you with a fresh |
Hi @BenjErgizerBunny , both, from old and also use this command "npx react-native init NewProject" |
I fixed this solution on my side. To upgrade xcode node version, run |
I have same issue, and on global env i use node 14.17.3 the same in xcode 14.17.3. So i guess this trouble not in the node versions mismatch. |
I've hit this as well. 0.64.2 - Debug and Archive both work 0.65.1 - Debug works; however, Archive generates an error while creating the bundle during the "node /node_modules/react-native/cli.js bundle --entry-file index.js --platform ios --dev false --reset-cache --bundle-output..." cmd If I run the command directly in my terminal, it is successful. |
If you've installed node via brew, you can fix it by changing this line in Xcode Build Phases->Bundle React Native code and images: |
Any updates for this issue?
I always get the same error.... |
Thought I'd toss in... just a little above the error for me, there are a couple lines of errors during the bunding:
might be a |
I managed to resolve it. Go to cd $PROJECT_DIR/..
export NODE_BINARY=node
./node_modules/react-native/scripts/react-native-xcode.sh
|
This solved the issue for me! |
THIS WORKED FOR ME THANK YOU!!!! |
this command helped me |
For those encountering this issue, it is probably coming from the This is configured with a shellScript, typically The error specifically comes form this line here react-native/scripts/react-native-xcode.sh Lines 185 to 189 in 2fdbf6a
It is prompted with the react-native/scripts/react-native-xcode.sh Lines 153 to 162 in 2fdbf6a
The error it gave wasn't shown during the xcode build, by adding an
In my project I didn't have a |
I fixed this by removing |
This was happening to me using Expo 46 and EAS. I spent 3 days trying to resolve it. A combination of things I found on StackOverflow and here helped. Step 6 was essential and critical for having successful EAS builds. Everything else after are for those using the latest version of Expo and React Native, and can't compile locally or on Expo's EAS server.
For Expo 45+ and/or React-Native 0.69.4 users:
Hopefully, all of this can help future devs, or at least bits and pieces. This was a 55 hours journey, and I really want to help those who were forced to upgrade due to 3rd party libraries. For me, it was the integration of the Square Reader SDK. Lastly, I really wish I had all of the urls, and usernames to provide thanks, and give credit, to. It was a lot of googling with trial and error. |
That's exactly what helped me too. |
It looks like react-native doesn't use
|
If i generate the bundle with "npx react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios" new, i get the error I i add "--verbose", no information given. |
@iSaBo96 I have experienced this issue when missing dependencies in my You can try to run If the config doesn't look right, or has an error running that command check that your package.json and |
if you are using a monorepo/yarn workspaces you're going to want to define the PROJECT_ROOT at the top of your Bundle React Native code and images script
that's the build phase that was failing for me and this fixed it ^ |
For me it turned out that one of the .js files imported a file from a directory with incorrect case (folder vs Folder). Happened because when changing the case of a file/directory git doesn't recognize it unless specified explicitly. |
yeaaah thank you ! |
I'm facing the same issue on an Intel based Mac. However, it completely works fine on an Apple silicon based Mac. |
thanks!!! |
There are numerous reasons why you can get such an error "main.jsbundle does not exist". I got it when I my code had syntax errors (missing commas in styled-component entities), and I had to build the app with RN CLI instead of Xcode to see these errors. |
I see that you have found a very good solution by creating a
change to
Hope it useful. |
I'm using nx, do you know how to fix this issue with nx monorepo |
I recently upgraded my React Native project from 0.64.0 to 0.72. I'm also getting this issue. |
Such a simple solution, this is what exactly helped me, thanks a lot @JDMathew |
After added "main.jsbubdle" in iOS manually all latest changes are not update on file save and metro server disconnect after app successfully launched,Any solution...? Thanks in advance |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Please provide all the information requested. Issues that do not follow this format are likely to stall.
Description
error: File /Users/robert/Library/Developer/Xcode/DerivedData/Kolbev-bphgvwixleedtdevmalrlelxeekn/Build/Intermediates.noindex/ArchiveIntermediates/Kolbev/BuildProductsPath/Release-iphoneos/Kolbev.app/main.jsbundle does not exist. This must be a bug with
React Native, please report it here: https://github.com/facebook/react-native/issues
React Native version:
System:
OS: macOS 11.5.2
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 914.61 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.22.1 - ~/.nvm/versions/node/v12.22.1/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.12 - ~/.nvm/versions/node/v12.22.1/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK:
API Levels: 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
Build Tools: 23.0.3, 25.0.2, 25.0.3, 27.0.3, 28.0.3, 29.0.0, 29.0.2, 29.0.3, 30.0.2
System Images: android-27 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.2 AI-202.7660.26.42.7486908
Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_201 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.65.1 => 0.65.1
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
The text was updated successfully, but these errors were encountered: