React-Native: Failed to load bundle. Cannot read property 'throwlfClosureRequired'
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
The app installs and opens but right when it opens this red screen appears with the below error message.
TBH I am not quite sure what I am doing and I really need some help. I was able to get my other project to work but when I started my second project this came up when trying to run the code. The code is just the basic code you get when you run: react-native init projectName

reactjs react-native
add a comment |
The app installs and opens but right when it opens this red screen appears with the below error message.
TBH I am not quite sure what I am doing and I really need some help. I was able to get my other project to work but when I started my second project this came up when trying to run the code. The code is just the basic code you get when you run: react-native init projectName

reactjs react-native
add a comment |
The app installs and opens but right when it opens this red screen appears with the below error message.
TBH I am not quite sure what I am doing and I really need some help. I was able to get my other project to work but when I started my second project this came up when trying to run the code. The code is just the basic code you get when you run: react-native init projectName

reactjs react-native
The app installs and opens but right when it opens this red screen appears with the below error message.
TBH I am not quite sure what I am doing and I really need some help. I was able to get my other project to work but when I started my second project this came up when trying to run the code. The code is just the basic code you get when you run: react-native init projectName

reactjs react-native
reactjs react-native
edited Apr 21 '18 at 2:55
Jonathan Ishii
asked Apr 21 '18 at 0:27
Jonathan IshiiJonathan Ishii
75127
75127
add a comment |
add a comment |
12 Answers
12
active
oldest
votes
Change the version of "babel-preset-react-native" to "4.0.0". For the lastest version 5.0.0, the issue arises.
- Run npm install after the version change. Then start the emulator.
- Even then if you face issue, delete your node_modules directory, repeat step 1.
- Restart your machine if you see the issue again even after all tries.
Check github issue
add a comment |
I got the above mentioned error just now. I am using React Native v0.57 and my json file had this
{
"name": "AwesomeProject",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.5.0",
"react-native": "0.57.1"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.45.6",
"react-test-renderer": "16.5.0"
},
"jest": {
"preset": "react-native"
}
}
I added "babel-preset-react-native": "4.0.0", and removed "metro-react-native-babel-preset": "0.45.6" in the "devDependencies" and the error was resolved.
I am using react native 0.51.1, and facing the same issue like you. I have changed the package.json file as you described. And run npm install again. But still getting an error while running it. Please help me out
– Vivek Shah
Sep 28 '18 at 13:28
It worked after restarting the computer.
– Vivek Shah
Sep 28 '18 at 16:14
add a comment |
Jonathan's solution worked for me as well:
Fixed. babel pushed an update that pushed to 5.0.0. set your presets to 4.0.0 and it will fix it.
https://github.com/facebook/react-native/issues/18962
add a comment |
I have upgraded to
"react-native": 0.57.7
"metro-react-native-babel-preset": "0.48.5",
Now the bundle is loading as expected.
add a comment |
My current version:
"react-native": "0.57.8",
"metro-react-native-babel-preset": "0.51.1",
Here how I fixed:
add
"devDependencies": {
"babel-preset-react-native": "4.0.0"
},
remove
node_modulesnpm install
Voilà! It works!
add a comment |
Fixed. babel pushed an update that pushed to 5.0.0. set your presets to 4.0.0 and it will fix it.
https://github.com/facebook/react-native/issues/18962
add a comment |
^^ what they said... change your "babel-preset-react-native" to 4.0.0 .
2
yes! that's all you gotta do and then run npm install in the folder
– Jonathan Ishii
Apr 25 '18 at 2:40
Tried all but the issue still exists.
– Biranchi
Dec 14 '18 at 8:16
add a comment |
Try this command
react-native upgrade
add a comment |
Had the same issue. Downgrading to "babel-preset-react-native": "4.0.0", did not work.
running this worked for me
npm add @babel/runtime
add a comment |
Try the followings:
clean the build folder and try again.
run react-native start --reset-cache in one tab
and then
run react-native in another tab
add a comment |
For me this answer worked:
https://stackoverflow.com/a/40966360/4483716
Basically I needed to give permission to folder
/Users/[username]/Library/LaunchAgents.
Use this command:
$ sudo chown $(whoami) /Users/$(whoami)/Library/LaunchAgents
add a comment |
- Add
babel-preset-react-nativeversion 4.0.0 to yourdevDependenciesinpackage.json
"devDependencies": {
"babel-preset-react-native": "4.0.0"
},
npm install
react-native run-iosor android
If it still doesn't work try rm -rf node_modules/ and redo step 2 & 3
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49951233%2freact-native-failed-to-load-bundle-cannot-read-property-throwlfclosurerequire%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
12 Answers
12
active
oldest
votes
12 Answers
12
active
oldest
votes
active
oldest
votes
active
oldest
votes
Change the version of "babel-preset-react-native" to "4.0.0". For the lastest version 5.0.0, the issue arises.
- Run npm install after the version change. Then start the emulator.
- Even then if you face issue, delete your node_modules directory, repeat step 1.
- Restart your machine if you see the issue again even after all tries.
Check github issue
add a comment |
Change the version of "babel-preset-react-native" to "4.0.0". For the lastest version 5.0.0, the issue arises.
- Run npm install after the version change. Then start the emulator.
- Even then if you face issue, delete your node_modules directory, repeat step 1.
- Restart your machine if you see the issue again even after all tries.
Check github issue
add a comment |
Change the version of "babel-preset-react-native" to "4.0.0". For the lastest version 5.0.0, the issue arises.
- Run npm install after the version change. Then start the emulator.
- Even then if you face issue, delete your node_modules directory, repeat step 1.
- Restart your machine if you see the issue again even after all tries.
Check github issue
Change the version of "babel-preset-react-native" to "4.0.0". For the lastest version 5.0.0, the issue arises.
- Run npm install after the version change. Then start the emulator.
- Even then if you face issue, delete your node_modules directory, repeat step 1.
- Restart your machine if you see the issue again even after all tries.
Check github issue
answered Apr 21 '18 at 10:09
pritampritam
568413
568413
add a comment |
add a comment |
I got the above mentioned error just now. I am using React Native v0.57 and my json file had this
{
"name": "AwesomeProject",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.5.0",
"react-native": "0.57.1"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.45.6",
"react-test-renderer": "16.5.0"
},
"jest": {
"preset": "react-native"
}
}
I added "babel-preset-react-native": "4.0.0", and removed "metro-react-native-babel-preset": "0.45.6" in the "devDependencies" and the error was resolved.
I am using react native 0.51.1, and facing the same issue like you. I have changed the package.json file as you described. And run npm install again. But still getting an error while running it. Please help me out
– Vivek Shah
Sep 28 '18 at 13:28
It worked after restarting the computer.
– Vivek Shah
Sep 28 '18 at 16:14
add a comment |
I got the above mentioned error just now. I am using React Native v0.57 and my json file had this
{
"name": "AwesomeProject",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.5.0",
"react-native": "0.57.1"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.45.6",
"react-test-renderer": "16.5.0"
},
"jest": {
"preset": "react-native"
}
}
I added "babel-preset-react-native": "4.0.0", and removed "metro-react-native-babel-preset": "0.45.6" in the "devDependencies" and the error was resolved.
I am using react native 0.51.1, and facing the same issue like you. I have changed the package.json file as you described. And run npm install again. But still getting an error while running it. Please help me out
– Vivek Shah
Sep 28 '18 at 13:28
It worked after restarting the computer.
– Vivek Shah
Sep 28 '18 at 16:14
add a comment |
I got the above mentioned error just now. I am using React Native v0.57 and my json file had this
{
"name": "AwesomeProject",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.5.0",
"react-native": "0.57.1"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.45.6",
"react-test-renderer": "16.5.0"
},
"jest": {
"preset": "react-native"
}
}
I added "babel-preset-react-native": "4.0.0", and removed "metro-react-native-babel-preset": "0.45.6" in the "devDependencies" and the error was resolved.
I got the above mentioned error just now. I am using React Native v0.57 and my json file had this
{
"name": "AwesomeProject",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.5.0",
"react-native": "0.57.1"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.45.6",
"react-test-renderer": "16.5.0"
},
"jest": {
"preset": "react-native"
}
}
I added "babel-preset-react-native": "4.0.0", and removed "metro-react-native-babel-preset": "0.45.6" in the "devDependencies" and the error was resolved.
edited Sep 25 '18 at 16:02
answered Sep 22 '18 at 18:11
Ronique RickettsRonique Ricketts
11915
11915
I am using react native 0.51.1, and facing the same issue like you. I have changed the package.json file as you described. And run npm install again. But still getting an error while running it. Please help me out
– Vivek Shah
Sep 28 '18 at 13:28
It worked after restarting the computer.
– Vivek Shah
Sep 28 '18 at 16:14
add a comment |
I am using react native 0.51.1, and facing the same issue like you. I have changed the package.json file as you described. And run npm install again. But still getting an error while running it. Please help me out
– Vivek Shah
Sep 28 '18 at 13:28
It worked after restarting the computer.
– Vivek Shah
Sep 28 '18 at 16:14
I am using react native 0.51.1, and facing the same issue like you. I have changed the package.json file as you described. And run npm install again. But still getting an error while running it. Please help me out
– Vivek Shah
Sep 28 '18 at 13:28
I am using react native 0.51.1, and facing the same issue like you. I have changed the package.json file as you described. And run npm install again. But still getting an error while running it. Please help me out
– Vivek Shah
Sep 28 '18 at 13:28
It worked after restarting the computer.
– Vivek Shah
Sep 28 '18 at 16:14
It worked after restarting the computer.
– Vivek Shah
Sep 28 '18 at 16:14
add a comment |
Jonathan's solution worked for me as well:
Fixed. babel pushed an update that pushed to 5.0.0. set your presets to 4.0.0 and it will fix it.
https://github.com/facebook/react-native/issues/18962
add a comment |
Jonathan's solution worked for me as well:
Fixed. babel pushed an update that pushed to 5.0.0. set your presets to 4.0.0 and it will fix it.
https://github.com/facebook/react-native/issues/18962
add a comment |
Jonathan's solution worked for me as well:
Fixed. babel pushed an update that pushed to 5.0.0. set your presets to 4.0.0 and it will fix it.
https://github.com/facebook/react-native/issues/18962
Jonathan's solution worked for me as well:
Fixed. babel pushed an update that pushed to 5.0.0. set your presets to 4.0.0 and it will fix it.
https://github.com/facebook/react-native/issues/18962
answered Oct 2 '18 at 3:31
Eric KannerEric Kanner
111
111
add a comment |
add a comment |
I have upgraded to
"react-native": 0.57.7
"metro-react-native-babel-preset": "0.48.5",
Now the bundle is loading as expected.
add a comment |
I have upgraded to
"react-native": 0.57.7
"metro-react-native-babel-preset": "0.48.5",
Now the bundle is loading as expected.
add a comment |
I have upgraded to
"react-native": 0.57.7
"metro-react-native-babel-preset": "0.48.5",
Now the bundle is loading as expected.
I have upgraded to
"react-native": 0.57.7
"metro-react-native-babel-preset": "0.48.5",
Now the bundle is loading as expected.
answered Dec 12 '18 at 22:16
Srikanth KyathamSrikanth Kyatham
35124
35124
add a comment |
add a comment |
My current version:
"react-native": "0.57.8",
"metro-react-native-babel-preset": "0.51.1",
Here how I fixed:
add
"devDependencies": {
"babel-preset-react-native": "4.0.0"
},
remove
node_modulesnpm install
Voilà! It works!
add a comment |
My current version:
"react-native": "0.57.8",
"metro-react-native-babel-preset": "0.51.1",
Here how I fixed:
add
"devDependencies": {
"babel-preset-react-native": "4.0.0"
},
remove
node_modulesnpm install
Voilà! It works!
add a comment |
My current version:
"react-native": "0.57.8",
"metro-react-native-babel-preset": "0.51.1",
Here how I fixed:
add
"devDependencies": {
"babel-preset-react-native": "4.0.0"
},
remove
node_modulesnpm install
Voilà! It works!
My current version:
"react-native": "0.57.8",
"metro-react-native-babel-preset": "0.51.1",
Here how I fixed:
add
"devDependencies": {
"babel-preset-react-native": "4.0.0"
},
remove
node_modulesnpm install
Voilà! It works!
answered Jan 28 at 3:52
Saviah KaoSaviah Kao
4617
4617
add a comment |
add a comment |
Fixed. babel pushed an update that pushed to 5.0.0. set your presets to 4.0.0 and it will fix it.
https://github.com/facebook/react-native/issues/18962
add a comment |
Fixed. babel pushed an update that pushed to 5.0.0. set your presets to 4.0.0 and it will fix it.
https://github.com/facebook/react-native/issues/18962
add a comment |
Fixed. babel pushed an update that pushed to 5.0.0. set your presets to 4.0.0 and it will fix it.
https://github.com/facebook/react-native/issues/18962
Fixed. babel pushed an update that pushed to 5.0.0. set your presets to 4.0.0 and it will fix it.
https://github.com/facebook/react-native/issues/18962
answered Apr 21 '18 at 3:02
Jonathan IshiiJonathan Ishii
75127
75127
add a comment |
add a comment |
^^ what they said... change your "babel-preset-react-native" to 4.0.0 .
2
yes! that's all you gotta do and then run npm install in the folder
– Jonathan Ishii
Apr 25 '18 at 2:40
Tried all but the issue still exists.
– Biranchi
Dec 14 '18 at 8:16
add a comment |
^^ what they said... change your "babel-preset-react-native" to 4.0.0 .
2
yes! that's all you gotta do and then run npm install in the folder
– Jonathan Ishii
Apr 25 '18 at 2:40
Tried all but the issue still exists.
– Biranchi
Dec 14 '18 at 8:16
add a comment |
^^ what they said... change your "babel-preset-react-native" to 4.0.0 .
^^ what they said... change your "babel-preset-react-native" to 4.0.0 .
answered Apr 22 '18 at 1:02
AJ GenungAJ Genung
28317
28317
2
yes! that's all you gotta do and then run npm install in the folder
– Jonathan Ishii
Apr 25 '18 at 2:40
Tried all but the issue still exists.
– Biranchi
Dec 14 '18 at 8:16
add a comment |
2
yes! that's all you gotta do and then run npm install in the folder
– Jonathan Ishii
Apr 25 '18 at 2:40
Tried all but the issue still exists.
– Biranchi
Dec 14 '18 at 8:16
2
2
yes! that's all you gotta do and then run npm install in the folder
– Jonathan Ishii
Apr 25 '18 at 2:40
yes! that's all you gotta do and then run npm install in the folder
– Jonathan Ishii
Apr 25 '18 at 2:40
Tried all but the issue still exists.
– Biranchi
Dec 14 '18 at 8:16
Tried all but the issue still exists.
– Biranchi
Dec 14 '18 at 8:16
add a comment |
Try this command
react-native upgrade
add a comment |
Try this command
react-native upgrade
add a comment |
Try this command
react-native upgrade
Try this command
react-native upgrade
answered Jul 9 '18 at 11:24
Hoque MD ZahidulHoque MD Zahidul
1,95411626
1,95411626
add a comment |
add a comment |
Had the same issue. Downgrading to "babel-preset-react-native": "4.0.0", did not work.
running this worked for me
npm add @babel/runtime
add a comment |
Had the same issue. Downgrading to "babel-preset-react-native": "4.0.0", did not work.
running this worked for me
npm add @babel/runtime
add a comment |
Had the same issue. Downgrading to "babel-preset-react-native": "4.0.0", did not work.
running this worked for me
npm add @babel/runtime
Had the same issue. Downgrading to "babel-preset-react-native": "4.0.0", did not work.
running this worked for me
npm add @babel/runtime
answered Oct 2 '18 at 1:26
M Sohaib KhanM Sohaib Khan
828
828
add a comment |
add a comment |
Try the followings:
clean the build folder and try again.
run react-native start --reset-cache in one tab
and then
run react-native in another tab
add a comment |
Try the followings:
clean the build folder and try again.
run react-native start --reset-cache in one tab
and then
run react-native in another tab
add a comment |
Try the followings:
clean the build folder and try again.
run react-native start --reset-cache in one tab
and then
run react-native in another tab
Try the followings:
clean the build folder and try again.
run react-native start --reset-cache in one tab
and then
run react-native in another tab
answered Oct 7 '18 at 15:37
PRaoPRao
74122
74122
add a comment |
add a comment |
For me this answer worked:
https://stackoverflow.com/a/40966360/4483716
Basically I needed to give permission to folder
/Users/[username]/Library/LaunchAgents.
Use this command:
$ sudo chown $(whoami) /Users/$(whoami)/Library/LaunchAgents
add a comment |
For me this answer worked:
https://stackoverflow.com/a/40966360/4483716
Basically I needed to give permission to folder
/Users/[username]/Library/LaunchAgents.
Use this command:
$ sudo chown $(whoami) /Users/$(whoami)/Library/LaunchAgents
add a comment |
For me this answer worked:
https://stackoverflow.com/a/40966360/4483716
Basically I needed to give permission to folder
/Users/[username]/Library/LaunchAgents.
Use this command:
$ sudo chown $(whoami) /Users/$(whoami)/Library/LaunchAgents
For me this answer worked:
https://stackoverflow.com/a/40966360/4483716
Basically I needed to give permission to folder
/Users/[username]/Library/LaunchAgents.
Use this command:
$ sudo chown $(whoami) /Users/$(whoami)/Library/LaunchAgents
answered Nov 9 '18 at 3:00
DasogaDasoga
3,18212131
3,18212131
add a comment |
add a comment |
- Add
babel-preset-react-nativeversion 4.0.0 to yourdevDependenciesinpackage.json
"devDependencies": {
"babel-preset-react-native": "4.0.0"
},
npm install
react-native run-iosor android
If it still doesn't work try rm -rf node_modules/ and redo step 2 & 3
add a comment |
- Add
babel-preset-react-nativeversion 4.0.0 to yourdevDependenciesinpackage.json
"devDependencies": {
"babel-preset-react-native": "4.0.0"
},
npm install
react-native run-iosor android
If it still doesn't work try rm -rf node_modules/ and redo step 2 & 3
add a comment |
- Add
babel-preset-react-nativeversion 4.0.0 to yourdevDependenciesinpackage.json
"devDependencies": {
"babel-preset-react-native": "4.0.0"
},
npm install
react-native run-iosor android
If it still doesn't work try rm -rf node_modules/ and redo step 2 & 3
- Add
babel-preset-react-nativeversion 4.0.0 to yourdevDependenciesinpackage.json
"devDependencies": {
"babel-preset-react-native": "4.0.0"
},
npm install
react-native run-iosor android
If it still doesn't work try rm -rf node_modules/ and redo step 2 & 3
answered Nov 17 '18 at 4:04
Ryan EfendyRyan Efendy
74779
74779
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49951233%2freact-native-failed-to-load-bundle-cannot-read-property-throwlfclosurerequire%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown