How to solve react webpack problem with npm-start












0















Here is my error page:




There might be a problem with the project dependency tree. It is
likely not a bug in Create React App, but something you need to fix
locally.



The react-scripts package provided by Create React App requires a
dependency:



"webpack": "4.19.1"



Don't try to install it manually: your package manager does it
automatically. However, a different version of webpack was detected
higher up in the tree:



C:UsersAcernode_moduleswebpack (version: 4.28.3)



Manually installing incompatible versions is known to cause
hard-to-debug issues.



If you would prefer to ignore this check, add
SKIP_PREFLIGHT_CHECK=true to an .env file in your project. That will
permanently disable this message but you might encounter other issues.



To fix the dependency tree, try following the steps below in the exact
order:




  1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.

  2. Delete node_modules in your project folder.

  3. Remove "webpack" from dependencies and/or devDependencies in the package.json file in your project folder.

  4. Run npm install or yarn, depending on the package manager you use.


In most cases, this should be enough to fix the problem. If this has
not helped, there are a few other things you can try:




  1. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
    This may help because npm has known issues with package hoisting which may get resolved in future versions.


  2. Check if C:UsersAcernode_moduleswebpack is outside your project directory.
    For example, you might have accidentally installed something in your home folder.


  3. Try running npm ls webpack in your project folder.
    This will tell you which other package (apart from the expected react-scripts) installed webpack.



If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file
in your project. That would permanently disable this preflight check
in case you want to proceed anyway.



P.S. We know this message is long but please read the steps above :-)
We hope you find them helpful!



npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! first-app@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the first-app@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersAcerAppDataRoamingnpm-cache_logs2019-01-03T12_30_23_160Z-debug.log



I've applied all steps but, npm start command still doesn't work.
What should I do?










share|improve this question




















  • 1





    Welcome to stackoverflow. Please read : stackoverflow.com/help/on-topic, stackoverflow.com/help/how-to-ask and stackoverflow.com/help/dont-ask. You may need to format your question a little bit highlighting what is the exact problem and what you are expecting.

    – Soumya Kanti
    Jan 3 at 13:05











  • Have you tried what's suggested here.

    – RobC
    Jan 3 at 13:39











  • stackoverflow.com/questions/13066532/… I just solved it using instructions on this link !

    – Sikander Nawaz
    Feb 13 at 21:14
















0















Here is my error page:




There might be a problem with the project dependency tree. It is
likely not a bug in Create React App, but something you need to fix
locally.



The react-scripts package provided by Create React App requires a
dependency:



"webpack": "4.19.1"



Don't try to install it manually: your package manager does it
automatically. However, a different version of webpack was detected
higher up in the tree:



C:UsersAcernode_moduleswebpack (version: 4.28.3)



Manually installing incompatible versions is known to cause
hard-to-debug issues.



If you would prefer to ignore this check, add
SKIP_PREFLIGHT_CHECK=true to an .env file in your project. That will
permanently disable this message but you might encounter other issues.



To fix the dependency tree, try following the steps below in the exact
order:




  1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.

  2. Delete node_modules in your project folder.

  3. Remove "webpack" from dependencies and/or devDependencies in the package.json file in your project folder.

  4. Run npm install or yarn, depending on the package manager you use.


In most cases, this should be enough to fix the problem. If this has
not helped, there are a few other things you can try:




  1. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
    This may help because npm has known issues with package hoisting which may get resolved in future versions.


  2. Check if C:UsersAcernode_moduleswebpack is outside your project directory.
    For example, you might have accidentally installed something in your home folder.


  3. Try running npm ls webpack in your project folder.
    This will tell you which other package (apart from the expected react-scripts) installed webpack.



If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file
in your project. That would permanently disable this preflight check
in case you want to proceed anyway.



P.S. We know this message is long but please read the steps above :-)
We hope you find them helpful!



npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! first-app@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the first-app@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersAcerAppDataRoamingnpm-cache_logs2019-01-03T12_30_23_160Z-debug.log



I've applied all steps but, npm start command still doesn't work.
What should I do?










share|improve this question




















  • 1





    Welcome to stackoverflow. Please read : stackoverflow.com/help/on-topic, stackoverflow.com/help/how-to-ask and stackoverflow.com/help/dont-ask. You may need to format your question a little bit highlighting what is the exact problem and what you are expecting.

    – Soumya Kanti
    Jan 3 at 13:05











  • Have you tried what's suggested here.

    – RobC
    Jan 3 at 13:39











  • stackoverflow.com/questions/13066532/… I just solved it using instructions on this link !

    – Sikander Nawaz
    Feb 13 at 21:14














0












0








0








Here is my error page:




There might be a problem with the project dependency tree. It is
likely not a bug in Create React App, but something you need to fix
locally.



The react-scripts package provided by Create React App requires a
dependency:



"webpack": "4.19.1"



Don't try to install it manually: your package manager does it
automatically. However, a different version of webpack was detected
higher up in the tree:



C:UsersAcernode_moduleswebpack (version: 4.28.3)



Manually installing incompatible versions is known to cause
hard-to-debug issues.



If you would prefer to ignore this check, add
SKIP_PREFLIGHT_CHECK=true to an .env file in your project. That will
permanently disable this message but you might encounter other issues.



To fix the dependency tree, try following the steps below in the exact
order:




  1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.

  2. Delete node_modules in your project folder.

  3. Remove "webpack" from dependencies and/or devDependencies in the package.json file in your project folder.

  4. Run npm install or yarn, depending on the package manager you use.


In most cases, this should be enough to fix the problem. If this has
not helped, there are a few other things you can try:




  1. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
    This may help because npm has known issues with package hoisting which may get resolved in future versions.


  2. Check if C:UsersAcernode_moduleswebpack is outside your project directory.
    For example, you might have accidentally installed something in your home folder.


  3. Try running npm ls webpack in your project folder.
    This will tell you which other package (apart from the expected react-scripts) installed webpack.



If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file
in your project. That would permanently disable this preflight check
in case you want to proceed anyway.



P.S. We know this message is long but please read the steps above :-)
We hope you find them helpful!



npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! first-app@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the first-app@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersAcerAppDataRoamingnpm-cache_logs2019-01-03T12_30_23_160Z-debug.log



I've applied all steps but, npm start command still doesn't work.
What should I do?










share|improve this question
















Here is my error page:




There might be a problem with the project dependency tree. It is
likely not a bug in Create React App, but something you need to fix
locally.



The react-scripts package provided by Create React App requires a
dependency:



"webpack": "4.19.1"



Don't try to install it manually: your package manager does it
automatically. However, a different version of webpack was detected
higher up in the tree:



C:UsersAcernode_moduleswebpack (version: 4.28.3)



Manually installing incompatible versions is known to cause
hard-to-debug issues.



If you would prefer to ignore this check, add
SKIP_PREFLIGHT_CHECK=true to an .env file in your project. That will
permanently disable this message but you might encounter other issues.



To fix the dependency tree, try following the steps below in the exact
order:




  1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.

  2. Delete node_modules in your project folder.

  3. Remove "webpack" from dependencies and/or devDependencies in the package.json file in your project folder.

  4. Run npm install or yarn, depending on the package manager you use.


In most cases, this should be enough to fix the problem. If this has
not helped, there are a few other things you can try:




  1. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
    This may help because npm has known issues with package hoisting which may get resolved in future versions.


  2. Check if C:UsersAcernode_moduleswebpack is outside your project directory.
    For example, you might have accidentally installed something in your home folder.


  3. Try running npm ls webpack in your project folder.
    This will tell you which other package (apart from the expected react-scripts) installed webpack.



If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file
in your project. That would permanently disable this preflight check
in case you want to proceed anyway.



P.S. We know this message is long but please read the steps above :-)
We hope you find them helpful!



npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! first-app@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the first-app@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersAcerAppDataRoamingnpm-cache_logs2019-01-03T12_30_23_160Z-debug.log



I've applied all steps but, npm start command still doesn't work.
What should I do?







reactjs npm webpack






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 3 at 13:32









RobC

6,68392741




6,68392741










asked Jan 3 at 12:34









efeozkesiciefeozkesici

11




11








  • 1





    Welcome to stackoverflow. Please read : stackoverflow.com/help/on-topic, stackoverflow.com/help/how-to-ask and stackoverflow.com/help/dont-ask. You may need to format your question a little bit highlighting what is the exact problem and what you are expecting.

    – Soumya Kanti
    Jan 3 at 13:05











  • Have you tried what's suggested here.

    – RobC
    Jan 3 at 13:39











  • stackoverflow.com/questions/13066532/… I just solved it using instructions on this link !

    – Sikander Nawaz
    Feb 13 at 21:14














  • 1





    Welcome to stackoverflow. Please read : stackoverflow.com/help/on-topic, stackoverflow.com/help/how-to-ask and stackoverflow.com/help/dont-ask. You may need to format your question a little bit highlighting what is the exact problem and what you are expecting.

    – Soumya Kanti
    Jan 3 at 13:05











  • Have you tried what's suggested here.

    – RobC
    Jan 3 at 13:39











  • stackoverflow.com/questions/13066532/… I just solved it using instructions on this link !

    – Sikander Nawaz
    Feb 13 at 21:14








1




1





Welcome to stackoverflow. Please read : stackoverflow.com/help/on-topic, stackoverflow.com/help/how-to-ask and stackoverflow.com/help/dont-ask. You may need to format your question a little bit highlighting what is the exact problem and what you are expecting.

– Soumya Kanti
Jan 3 at 13:05





Welcome to stackoverflow. Please read : stackoverflow.com/help/on-topic, stackoverflow.com/help/how-to-ask and stackoverflow.com/help/dont-ask. You may need to format your question a little bit highlighting what is the exact problem and what you are expecting.

– Soumya Kanti
Jan 3 at 13:05













Have you tried what's suggested here.

– RobC
Jan 3 at 13:39





Have you tried what's suggested here.

– RobC
Jan 3 at 13:39













stackoverflow.com/questions/13066532/… I just solved it using instructions on this link !

– Sikander Nawaz
Feb 13 at 21:14





stackoverflow.com/questions/13066532/… I just solved it using instructions on this link !

– Sikander Nawaz
Feb 13 at 21:14












2 Answers
2






active

oldest

votes


















2














I got the solution! Focus on the point 6: it asks to delete node_modules folder outside your project directory.



So, I deleted my C:UsersAcernode_modules folder and npm start worked for me !!






share|improve this answer

































    -1














    I have the same error !
    I think i might have installed some previous version of webpack and can't get rid off!
    i picked up my friends computer and installed react as these commands



    npm install create-react-app -g
    create-react-app newappname


    then after some time



    npm start


    and it opened in browser, it worked like that.



    How to uninstall npm modules in node js?






    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%2f54022392%2fhow-to-solve-react-webpack-problem-with-npm-start%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      2














      I got the solution! Focus on the point 6: it asks to delete node_modules folder outside your project directory.



      So, I deleted my C:UsersAcernode_modules folder and npm start worked for me !!






      share|improve this answer






























        2














        I got the solution! Focus on the point 6: it asks to delete node_modules folder outside your project directory.



        So, I deleted my C:UsersAcernode_modules folder and npm start worked for me !!






        share|improve this answer




























          2












          2








          2







          I got the solution! Focus on the point 6: it asks to delete node_modules folder outside your project directory.



          So, I deleted my C:UsersAcernode_modules folder and npm start worked for me !!






          share|improve this answer















          I got the solution! Focus on the point 6: it asks to delete node_modules folder outside your project directory.



          So, I deleted my C:UsersAcernode_modules folder and npm start worked for me !!







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 20 at 7:31









          Multihunter

          2,0151920




          2,0151920










          answered Mar 20 at 5:34









          jino cjjino cj

          213




          213

























              -1














              I have the same error !
              I think i might have installed some previous version of webpack and can't get rid off!
              i picked up my friends computer and installed react as these commands



              npm install create-react-app -g
              create-react-app newappname


              then after some time



              npm start


              and it opened in browser, it worked like that.



              How to uninstall npm modules in node js?






              share|improve this answer






























                -1














                I have the same error !
                I think i might have installed some previous version of webpack and can't get rid off!
                i picked up my friends computer and installed react as these commands



                npm install create-react-app -g
                create-react-app newappname


                then after some time



                npm start


                and it opened in browser, it worked like that.



                How to uninstall npm modules in node js?






                share|improve this answer




























                  -1












                  -1








                  -1







                  I have the same error !
                  I think i might have installed some previous version of webpack and can't get rid off!
                  i picked up my friends computer and installed react as these commands



                  npm install create-react-app -g
                  create-react-app newappname


                  then after some time



                  npm start


                  and it opened in browser, it worked like that.



                  How to uninstall npm modules in node js?






                  share|improve this answer















                  I have the same error !
                  I think i might have installed some previous version of webpack and can't get rid off!
                  i picked up my friends computer and installed react as these commands



                  npm install create-react-app -g
                  create-react-app newappname


                  then after some time



                  npm start


                  and it opened in browser, it worked like that.



                  How to uninstall npm modules in node js?







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Feb 13 at 21:48









                  Edgar Ortega

                  8001015




                  8001015










                  answered Feb 13 at 20:57









                  Sikander NawazSikander Nawaz

                  11




                  11






























                      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%2f54022392%2fhow-to-solve-react-webpack-problem-with-npm-start%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

                      Monofisismo

                      Angular Downloading a file using contenturl with Basic Authentication

                      Olmecas