-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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 + echo 'React Native #15432
Comments
This happens when there is no offline bundle file in your project, I had the same problem and this worked for me. If you're running on the device, check the Running On Device docs I added the below to my
And you can run it like this You'll see the Next, open your project using XCode, right click on your project name then click That should do it. I'm using
|
Not sure if this is the answer, but this issue went away for me when I moved my type declaration packages from The packages were |
@scottyantipa Can you elaborate on that? What packages? and what |
@lolobosse I updated my comment above |
@scottyantipa I found my error, it was a weird I had to debug the bundler and I saw the file crashing. @reactnative Team: that would be great that if the |
For this issue was caused because the Original (what react native generated):
Fixed:
|
I had a similar error after doing a pull of a repo upgraded to 0.48.4 (someone else did the RN upgrading). Doing |
@lolobosse What string was the / in? React Native code, or somewhere in XCode? |
@johndanek The |
Tried all of above, problem still persisting. Why was this closed @hanishsharma ? |
@hanishsharma Why did you close this? |
I just got this, and that was just that the bundle wasn't building correctly. I started dev mode and found an fatal error that were blocking compilation (a bad require). It was that simple. |
I had this issue as well when I tried to create an archive in Xcode. For me, it was because the command to build the JS bundle was failing, and the reason it was failing was because one of my dependencies had a specific babel preset in its In the Xcode error output, a few lines above the "main.jsbundle does not exist" line, I had the following error message from the
So I installed the missing plugin by running: I then went to Xcode again, did a Product -> Clean, then Product -> Archive, and this time it worked. I actually used to have these dependency-related babel plugins installed, but I removed them because the release notes for 0.50.0 (https://github.com/facebook/react-native/releases/tag/v0.50.0) stated that this wouldn't be required anymore due to the change in enableBabelRCLookup. But I guess that change isn't quite working correctly, so for now we'll have to keep using the workaround I used here, or the postinstall workaround that they describe in those release notes. For reference, here's my dependencies:
|
Just to share something that I've found out about this issue.
Took me some good 2 hours to find it out. |
i have same problem, i use |
The problem for me had to do with Apple's iCloud syncing my desktop and documents. For me the fix was moving the folder to a directory that wasn't synced with icloud in my |
The key here is to look in Xcode, above the "main.jsbundle does not exist" message and see what the actual reason for the bundle not being created is: In my case, the actual error ( |
Not sure if I'm doing this correctly but I had this issue when trying to run I removed the following to enable App Transport Security:
However, if I don't add it back in to my Info.plist when I want to debug, then I get the main.jsbundle missing error. |
Hello guys! I tried everything that I read through github issues and google but I can't still find the solution for me. When I'm using the simulator everything is fine but when I try to make an archive or build it on my phone I have this error:
My dependencies are:
I will be very happy if anyone could help me because I am stuck with this issue from 2 days and I can't submit my app for test flight. |
Just had this issue myself, turns out it was caused due to a space in one of my higher up folder names. I removed the space from the name and it sprang into life! |
Find another case: Wrong case in file name。
The actual filename is |
Looks like the issue with spaces in the CLI path was fixed in #17628. |
Hi, is there any difference in using I am experiencing the following issue: https://stackoverflow.com/questions/48751053/react-native-unbundle-app-gets-hung-in-release |
Both your solutions didn’t work for me "build:ios": "react-native bundle --entry-file='index.ios.js' --bundle-output='./ios/YourAppName/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'" & export NODE_BINARY=node |
It seems to have worked for me, I had to add the file into xcode and add it into the "Build Phases"->"Copy Bundle Resources" in the target. Assuming you've modified AppDelegate.m to load the resource instead of using RCTBundleURLProvider:
|
Ran into this issue today and it turns out that invoking the build via a yarn script was the culprit. Using |
i did what IbraheemAlSaady told us to do and my app is having a a really weird behavior, it change all my aplications images/icons to the |
I'm having a similar issue has anyone had this issue before - https://stackoverflow.com/questions/49313917/react-native-app-can-build-for-debugging-but-not-for-archiving |
got this error when library was added but forgot to run npm i / yarn |
This is my script : Create jsbundle and import to XCode. https://gist.github.com/matteocollina/ee92ee698ddfefceb8ce85c9d94d69df
|
None of everything above worked for me. I had to change
|
For me, it's because of remove some packages (via npm uninstall/yarn remove) but still have references in Xcode project. The solution is goto Build Settings, then remove node_modules reference of deleted packages in "Framework Search Path" and "Header Search Paths". Hope it help someone here. |
Look above of the error, you will fine what exactly wrong when the shell script trying to package your js file. |
* build:ios was added to package.json only needed so i can run it to see why it was failing - the sh script auto does this, and with better args, this one i just copied from - facebook/react-native#15432 (comment) - doing this told me trasnform-remove-console was missing, and yes i had forgot to npm i that on the mac, it was only on windows * it also seems in release version i always get entitlement error, but if i archive it and install it works
Like many people, I came across this topic when I had the same mistake, which is why I want to share what really caused the problem : It turns out that it's the same problem that npalethorpe got (#15432 (comment)), Jenkins create directory workspace according to the build name which in our case had several spaces. I'm not 100% sure that issue come from the react-native upgrade, but removing the space from the build name (so from the directory name) resolve the issue and build no longer fail on the |
this occurred when I had a problem in directory js modules |
got this error after execute command |
Useing Xcode to open the iOS project will solve this problem. |
I find an easy way to solve it . you just run your project using simulator while not your Device at the first time. After you do it, it will have a local main.jsbundle file automatically and then you can run it on your Device success. it works for me, hope so with you. |
I'm getting the issue when doing CD builds on Bitrise using the Xcode archive and export step. Here's the last bit of the log:
I'm confused because the build has been working very well for us for quite some time, and it just started failing. Additionally, I can't reproduce the issue locally via normal debug builds or via a local Xcode archive in release mode. Any thoughts on what I should look into next? I'm thinking about trying to nuke the node_modules cache for yarn first. |
Thanks @futurechallenger , actual error was above the highlighted error! |
@gfly 你搞定这个问题了? |
For me it works on my local machine but it fails on the bitrise build, locally works with node 8 and 10 but on bitrise works only with node 8 (only with yarn) |
I got the error "main.jsbundle does not exist" when I upgraded from 0.46.4 to 0.47. |
For me, the build process was using an old version of node. I had it installed via nvm so modified the following (in Build Phases > Bundle React Native code)
to
|
Run this command it should work. |
In case none of this works for you, restarting my Mac fixed the issue 🤯 |
??
rollin luo
邮箱:luolin2611@gmail.com
Signature is customized by Netease Mail Master
On 09/13/2018 03:53, Robert Kuncewicz wrote: In case none of this works for you, restarting my Mac fixed the issue 🤯
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/facebook/react-native","title":"facebook/react-native","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/facebook/react-native"}},"updates":{"snippets":[{"icon":"PERSON","message":"@rkuncewicz in #15432: In case none of this works for you, restarting my Mac fixed the issue 🤯"}],"action":{"name":"View Issue","url":"#15432 (comment)"}}}
[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "#15432 (comment)",
"url": "#15432 (comment)",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [facebook/react-native] main.jsbundle does not exist. This must be a bug with + echo 'React Native (#15432)",
"sections": [
{
"text": "",
"activityTitle": "**Robert Kuncewicz**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@rkuncewicz",
"facts": [
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"facebook/react-native\",\n\"issueId\": 15432,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"targets": [
{
"os": "default",
"uri": "#15432 (comment)"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 247993868\n}"
}
],
"themeColor": "26292E"
}
]
|
Hi All,
UPDATE: Found issue, unused import of |
Hi everyone, I got this error EnvironmentOS: macOS 10.14 ##Packages: (wanted => installed) DescriptionWhen I want to make the archive (IPA) file or run this command
Reproducible DemoI follow this https://stackoverflow.com/questions/49505446/main-jsbundle-does-not-exist-this-must-be-a-bug-with-echo-react-native It would be great if help me :) |
I got it working, thanks to @nadbm . I had a similar problem with node version. My global node version read 8.9.1. What I did was
export NODE_BINARY=node to export NODE_BINARY=<PATH_FROM_WHICH_NODE> So for me, I changed it to export NODE_BINARY=/usr/local/bin/node Thats it! Hope it helps someone. "react": "16.5.0", |
Hello team,
I am getting this error while running my xcode project.
main.jsbundle does not exist. This must be a bug with + echo 'React Native.
Please help.
Thanks.
The text was updated successfully, but these errors were encountered: