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;
}







10















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



Error when trying to setup project in react-native.










share|improve this question































    10















    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



    Error when trying to setup project in react-native.










    share|improve this question



























      10












      10








      10


      0






      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



      Error when trying to setup project in react-native.










      share|improve this question
















      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



      Error when trying to setup project in react-native.







      reactjs react-native






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 21 '18 at 2:55







      Jonathan Ishii

















      asked Apr 21 '18 at 0:27









      Jonathan IshiiJonathan Ishii

      75127




      75127
























          12 Answers
          12






          active

          oldest

          votes


















          7














          Change the version of "babel-preset-react-native" to "4.0.0". For the lastest version 5.0.0, the issue arises.




          1. Run npm install after the version change. Then start the emulator.

          2. Even then if you face issue, delete your node_modules directory, repeat step 1.

          3. Restart your machine if you see the issue again even after all tries.


          Check github issue






          share|improve this answer































            4














            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.






            share|improve this answer


























            • 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



















            1














            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






            share|improve this answer































              1














              I have upgraded to



              "react-native": 0.57.7



              "metro-react-native-babel-preset": "0.48.5",



              Now the bundle is loading as expected.






              share|improve this answer































                1














                My current version:



                "react-native": "0.57.8",

                "metro-react-native-babel-preset": "0.51.1",



                Here how I fixed:





                1. add



                  "devDependencies": {
                  "babel-preset-react-native": "4.0.0"
                  },


                2. remove node_modules


                3. npm install



                Voilà! It works!






                share|improve this answer































                  0














                  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






                  share|improve this answer































                    0














                    ^^ what they said... change your "babel-preset-react-native" to 4.0.0 .






                    share|improve this answer



















                    • 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



















                    0














                    Try this command
                    react-native upgrade






                    share|improve this answer































                      0














                      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






                      share|improve this answer































                        0














                        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






                        share|improve this answer































                          0














                          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





                          share|improve this answer































                            0















                            1. Add babel-preset-react-native version 4.0.0 to your devDependencies in package.json


                            "devDependencies": {
                            "babel-preset-react-native": "4.0.0"
                            },




                            1. npm install


                            2. react-native run-ios or android


                            If it still doesn't work try rm -rf node_modules/ and redo step 2 & 3






                            share|improve this answer
























                              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
                              });


                              }
                              });














                              draft saved

                              draft discarded


















                              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









                              7














                              Change the version of "babel-preset-react-native" to "4.0.0". For the lastest version 5.0.0, the issue arises.




                              1. Run npm install after the version change. Then start the emulator.

                              2. Even then if you face issue, delete your node_modules directory, repeat step 1.

                              3. Restart your machine if you see the issue again even after all tries.


                              Check github issue






                              share|improve this answer




























                                7














                                Change the version of "babel-preset-react-native" to "4.0.0". For the lastest version 5.0.0, the issue arises.




                                1. Run npm install after the version change. Then start the emulator.

                                2. Even then if you face issue, delete your node_modules directory, repeat step 1.

                                3. Restart your machine if you see the issue again even after all tries.


                                Check github issue






                                share|improve this answer


























                                  7












                                  7








                                  7







                                  Change the version of "babel-preset-react-native" to "4.0.0". For the lastest version 5.0.0, the issue arises.




                                  1. Run npm install after the version change. Then start the emulator.

                                  2. Even then if you face issue, delete your node_modules directory, repeat step 1.

                                  3. Restart your machine if you see the issue again even after all tries.


                                  Check github issue






                                  share|improve this answer













                                  Change the version of "babel-preset-react-native" to "4.0.0". For the lastest version 5.0.0, the issue arises.




                                  1. Run npm install after the version change. Then start the emulator.

                                  2. Even then if you face issue, delete your node_modules directory, repeat step 1.

                                  3. Restart your machine if you see the issue again even after all tries.


                                  Check github issue







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Apr 21 '18 at 10:09









                                  pritampritam

                                  568413




                                  568413

























                                      4














                                      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.






                                      share|improve this answer


























                                      • 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
















                                      4














                                      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.






                                      share|improve this answer


























                                      • 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














                                      4












                                      4








                                      4







                                      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.






                                      share|improve this answer















                                      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.







                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      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



















                                      • 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











                                      1














                                      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






                                      share|improve this answer




























                                        1














                                        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






                                        share|improve this answer


























                                          1












                                          1








                                          1







                                          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






                                          share|improve this answer













                                          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







                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Oct 2 '18 at 3:31









                                          Eric KannerEric Kanner

                                          111




                                          111























                                              1














                                              I have upgraded to



                                              "react-native": 0.57.7



                                              "metro-react-native-babel-preset": "0.48.5",



                                              Now the bundle is loading as expected.






                                              share|improve this answer




























                                                1














                                                I have upgraded to



                                                "react-native": 0.57.7



                                                "metro-react-native-babel-preset": "0.48.5",



                                                Now the bundle is loading as expected.






                                                share|improve this answer


























                                                  1












                                                  1








                                                  1







                                                  I have upgraded to



                                                  "react-native": 0.57.7



                                                  "metro-react-native-babel-preset": "0.48.5",



                                                  Now the bundle is loading as expected.






                                                  share|improve this answer













                                                  I have upgraded to



                                                  "react-native": 0.57.7



                                                  "metro-react-native-babel-preset": "0.48.5",



                                                  Now the bundle is loading as expected.







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Dec 12 '18 at 22:16









                                                  Srikanth KyathamSrikanth Kyatham

                                                  35124




                                                  35124























                                                      1














                                                      My current version:



                                                      "react-native": "0.57.8",

                                                      "metro-react-native-babel-preset": "0.51.1",



                                                      Here how I fixed:





                                                      1. add



                                                        "devDependencies": {
                                                        "babel-preset-react-native": "4.0.0"
                                                        },


                                                      2. remove node_modules


                                                      3. npm install



                                                      Voilà! It works!






                                                      share|improve this answer




























                                                        1














                                                        My current version:



                                                        "react-native": "0.57.8",

                                                        "metro-react-native-babel-preset": "0.51.1",



                                                        Here how I fixed:





                                                        1. add



                                                          "devDependencies": {
                                                          "babel-preset-react-native": "4.0.0"
                                                          },


                                                        2. remove node_modules


                                                        3. npm install



                                                        Voilà! It works!






                                                        share|improve this answer


























                                                          1












                                                          1








                                                          1







                                                          My current version:



                                                          "react-native": "0.57.8",

                                                          "metro-react-native-babel-preset": "0.51.1",



                                                          Here how I fixed:





                                                          1. add



                                                            "devDependencies": {
                                                            "babel-preset-react-native": "4.0.0"
                                                            },


                                                          2. remove node_modules


                                                          3. npm install



                                                          Voilà! It works!






                                                          share|improve this answer













                                                          My current version:



                                                          "react-native": "0.57.8",

                                                          "metro-react-native-babel-preset": "0.51.1",



                                                          Here how I fixed:





                                                          1. add



                                                            "devDependencies": {
                                                            "babel-preset-react-native": "4.0.0"
                                                            },


                                                          2. remove node_modules


                                                          3. npm install



                                                          Voilà! It works!







                                                          share|improve this answer












                                                          share|improve this answer



                                                          share|improve this answer










                                                          answered Jan 28 at 3:52









                                                          Saviah KaoSaviah Kao

                                                          4617




                                                          4617























                                                              0














                                                              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






                                                              share|improve this answer




























                                                                0














                                                                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






                                                                share|improve this answer


























                                                                  0












                                                                  0








                                                                  0







                                                                  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






                                                                  share|improve this answer













                                                                  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







                                                                  share|improve this answer












                                                                  share|improve this answer



                                                                  share|improve this answer










                                                                  answered Apr 21 '18 at 3:02









                                                                  Jonathan IshiiJonathan Ishii

                                                                  75127




                                                                  75127























                                                                      0














                                                                      ^^ what they said... change your "babel-preset-react-native" to 4.0.0 .






                                                                      share|improve this answer



















                                                                      • 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
















                                                                      0














                                                                      ^^ what they said... change your "babel-preset-react-native" to 4.0.0 .






                                                                      share|improve this answer



















                                                                      • 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














                                                                      0












                                                                      0








                                                                      0







                                                                      ^^ what they said... change your "babel-preset-react-native" to 4.0.0 .






                                                                      share|improve this answer













                                                                      ^^ what they said... change your "babel-preset-react-native" to 4.0.0 .







                                                                      share|improve this answer












                                                                      share|improve this answer



                                                                      share|improve this answer










                                                                      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














                                                                      • 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











                                                                      0














                                                                      Try this command
                                                                      react-native upgrade






                                                                      share|improve this answer




























                                                                        0














                                                                        Try this command
                                                                        react-native upgrade






                                                                        share|improve this answer


























                                                                          0












                                                                          0








                                                                          0







                                                                          Try this command
                                                                          react-native upgrade






                                                                          share|improve this answer













                                                                          Try this command
                                                                          react-native upgrade







                                                                          share|improve this answer












                                                                          share|improve this answer



                                                                          share|improve this answer










                                                                          answered Jul 9 '18 at 11:24









                                                                          Hoque MD ZahidulHoque MD Zahidul

                                                                          1,95411626




                                                                          1,95411626























                                                                              0














                                                                              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






                                                                              share|improve this answer




























                                                                                0














                                                                                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






                                                                                share|improve this answer


























                                                                                  0












                                                                                  0








                                                                                  0







                                                                                  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






                                                                                  share|improve this answer













                                                                                  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







                                                                                  share|improve this answer












                                                                                  share|improve this answer



                                                                                  share|improve this answer










                                                                                  answered Oct 2 '18 at 1:26









                                                                                  M Sohaib KhanM Sohaib Khan

                                                                                  828




                                                                                  828























                                                                                      0














                                                                                      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






                                                                                      share|improve this answer




























                                                                                        0














                                                                                        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






                                                                                        share|improve this answer


























                                                                                          0












                                                                                          0








                                                                                          0







                                                                                          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






                                                                                          share|improve this answer













                                                                                          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







                                                                                          share|improve this answer












                                                                                          share|improve this answer



                                                                                          share|improve this answer










                                                                                          answered Oct 7 '18 at 15:37









                                                                                          PRaoPRao

                                                                                          74122




                                                                                          74122























                                                                                              0














                                                                                              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





                                                                                              share|improve this answer




























                                                                                                0














                                                                                                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





                                                                                                share|improve this answer


























                                                                                                  0












                                                                                                  0








                                                                                                  0







                                                                                                  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





                                                                                                  share|improve this answer













                                                                                                  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






                                                                                                  share|improve this answer












                                                                                                  share|improve this answer



                                                                                                  share|improve this answer










                                                                                                  answered Nov 9 '18 at 3:00









                                                                                                  DasogaDasoga

                                                                                                  3,18212131




                                                                                                  3,18212131























                                                                                                      0















                                                                                                      1. Add babel-preset-react-native version 4.0.0 to your devDependencies in package.json


                                                                                                      "devDependencies": {
                                                                                                      "babel-preset-react-native": "4.0.0"
                                                                                                      },




                                                                                                      1. npm install


                                                                                                      2. react-native run-ios or android


                                                                                                      If it still doesn't work try rm -rf node_modules/ and redo step 2 & 3






                                                                                                      share|improve this answer




























                                                                                                        0















                                                                                                        1. Add babel-preset-react-native version 4.0.0 to your devDependencies in package.json


                                                                                                        "devDependencies": {
                                                                                                        "babel-preset-react-native": "4.0.0"
                                                                                                        },




                                                                                                        1. npm install


                                                                                                        2. react-native run-ios or android


                                                                                                        If it still doesn't work try rm -rf node_modules/ and redo step 2 & 3






                                                                                                        share|improve this answer


























                                                                                                          0












                                                                                                          0








                                                                                                          0








                                                                                                          1. Add babel-preset-react-native version 4.0.0 to your devDependencies in package.json


                                                                                                          "devDependencies": {
                                                                                                          "babel-preset-react-native": "4.0.0"
                                                                                                          },




                                                                                                          1. npm install


                                                                                                          2. react-native run-ios or android


                                                                                                          If it still doesn't work try rm -rf node_modules/ and redo step 2 & 3






                                                                                                          share|improve this answer














                                                                                                          1. Add babel-preset-react-native version 4.0.0 to your devDependencies in package.json


                                                                                                          "devDependencies": {
                                                                                                          "babel-preset-react-native": "4.0.0"
                                                                                                          },




                                                                                                          1. npm install


                                                                                                          2. react-native run-ios or android


                                                                                                          If it still doesn't work try rm -rf node_modules/ and redo step 2 & 3







                                                                                                          share|improve this answer












                                                                                                          share|improve this answer



                                                                                                          share|improve this answer










                                                                                                          answered Nov 17 '18 at 4:04









                                                                                                          Ryan EfendyRyan Efendy

                                                                                                          74779




                                                                                                          74779






























                                                                                                              draft saved

                                                                                                              draft discarded




















































                                                                                                              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.




                                                                                                              draft saved


                                                                                                              draft discarded














                                                                                                              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





















































                                                                                                              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







                                                                                                              Popular posts from this blog

                                                                                                              List item for chat from Array inside array React Native

                                                                                                              Thiostrepton

                                                                                                              Caerphilly