-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Failed to load bundle: Cannot read property 'throwIfClosureRequired' of undefined #18962
Comments
This is throwing in my tests when upgrading to Does not happen on 4.x of preset with |
Same here |
same issue, happened just now |
Same issue happened in windows for run-android |
downgraded |
downgraded babel-preset-react-native to 4.0.0 and worked. same as the comments above. |
First time I tried to play with |
How do you downgrade bable-preset-react-native to 4.0.0? |
@andrewcpeltier I just ran into this issue as well. Just edit the version number in your package.json file and npm install. Edit: Worked for me as well by the way! |
Also confirming this. Seemed to happen as of today when running 'react-native init' and then running a new project in XCode. Downgrading babel-preset to 4.0 or below seems to work. |
Open your
Then run |
The babel-preset-react-native package was just published 6 hours ago, so somewhere in the RN dependency tree, it's pulling the latest version instead of a fixed one. |
I can confirm changing to |
What's funny is this wasn't changed that long ago: 34bd776 Odd how that came right through to everyone's CLI. Seems to me it should be tied to the specific RN version, not github? |
The issue are due to these lines in the react-native/local-cli/init/init.js Lines 88 to 97 in 57919a3
You can see that the The change you see shouldn't actually affect why we see this bug, but rather, it's the fact that version That also explains why this bug was created 8 hours ago. |
Change "babel-preset-react-native": "^4.0.0" and it work for me |
I'm still get the same red error screen if I set the dev dependency to |
Nvm, now it works. Weird. Thanks everyone! 😄 |
some here, i changed to 4 but error still |
This issue is caused by the fact babel-preset-react-native depends on babel@v7.0.0-beta.40. This version had an issue on babel-plugin-transform-block-scoping, as at this stage babel-helper-plugin-utils had not yet been created, and this one (created on v7.0.0-beta.41) is used to set a default The only alternative would be to use yarn resolutions and lock all the babel depedencies to latest, but sadly this doesn't work either, as metro-bundler is in the middle of the migration to babel 7 and they are still using babel-core (core package from babel version 6), so when you run the packager, everything breaks. So based on all this, I believe that the most sane alternative is to wait for babel-preset-react-native and metro-bundler to update their babel dependencies to latest and meanwhile keep using v4.0.0. |
@duro Downgraded |
If not work try this solution. "devDependencies": { |
drowgrading to "babel-preset-react-native": "4.0.0" didn't work for me :( |
I changed to 4 but error still. |
For those who have updated the "babel-preset-react-native" to version "4.0.0", and still seeing the issue:
Worked for me with the environment:
|
Owl7 Did you run "npm install" yet ? |
@lehoangnam97 of course |
@pritam-patil error still. 😢 |
@pritam-patil @lehoangnam97 Started work, I restarted the computer. 😄 |
Hi everyone,
Hope it will help. |
Open your package.json and change the devDependencies to: "devDependencies": { Thanks @achuvm, this worked... |
same issue, happened just now after upgrading to version 5 |
@abhijitnukalapati - yes I am able to run the app after changing babel-preset-react-native to "4.0.0" |
Open your package.json and change the devDependencies to: "devDependencies": { |
I am very sorry sorry, but how is this do?
|
It also helps to kill Metro bundler and restart your Simulator. I even deleted the app from my iOS simulator as well just in case there was code cached somewhere else. |
After changing change change "babel-preset-react-native": "5.0.0" To "babel-preset-react-native": "4.0.0" and run npm install. its works for me Thanks so much |
"babel-preset-react-native": "4.0.0" |
@marksturm Thanks for the command. That worked for me finally. |
Thanks... It works.. |
@marksturm you just saved my life! <3 |
u guys saved me, thank you so much |
Using |
What's the root cause? |
The same problem, i solved dowgrading "babel-preset-react-native": "4.0.0" and restanting my computer, i'm on Ubuntu 17.10 |
Will get this fixed in next minor release today. |
The legend says that one day you will be able to generate a react-native project without solving random errors. |
@chuwuwang I am going to delete your comment and report this activity to Github. We do not accept such behavior that is way below the accepted standards. If React Native pisses you off, just don't use it. It's free world. |
downgrade babbel and run npm install is not helping ... I had to restart computer to make it work |
(closing as inactive, there have been new issues on the bundler subject and since this issue many things changed) (if necessary open a new issue) |
Environment
Environment:
OS: macOS High Sierra 10.13.4
Node: 9.5.0
Yarn: 1.5.1
npm: 5.8.0
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: Not Found
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.3 => 0.55.3
Steps to Reproduce
or by opening RNApp.xcodeproj and hitting "run"
Expected Behavior
App launches normally on simulator
Actual Behavior
The text was updated successfully, but these errors were encountered: