Why is npm start (after create-react-app) failing to run?












6















After I create a sample react app using create-react-app, npm start fails.



I have tried this using node 11.4 and 10.4 (npm 6.4.1)



>npm install create-react-app -g
>create-react-app t2
>cd t2
>npm start


expected: to be able to start simple react server to hit in browser at localhost:3000



actual: server did not start, got this in my terminal
Salvatores-iMac:t2 samr$ npm start




t2@0.1.0 start /Users/samr/dev/githubs/react/t2
react-scripts start




/Users/samr/dev/githubs/react/t2/node_modules/ajv/lib/keyword.js:65
throw new Error('custom keyword definition is invalid: ' + this.errorsText(validateDefinition.errors));
^



Error: custom keyword definition is invalid: data.errors should be boolean
at Ajv.addKeyword (/Users/samr/dev/githubs/react/t2/node_modules/ajv/lib/keyword.js:65:13)
at module.exports (/Users/samr/dev/githubs/react/t2/node_modules/ajv-errors/index.js:10:7)
at Object. (/Users/samr/dev/githubs/react/t2/node_modules/schema-utils/src/validateOptions.js:22:1)
at Module._compile (internal/modules/cjs/loader.js:723:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:734:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Module.require (internal/modules/cjs/loader.js:659:17)
at require (internal/modules/cjs/helpers.js:22:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! t2@0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the t2@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! /Users/samr/.npm/_logs/2019-02-09T23_19_40_848Z-debug.log










share|improve this question







New contributor




javazen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Looks like a known issue: github.com/webpack/webpack/issues/8768

    – Lambda Fairy
    3 hours ago
















6















After I create a sample react app using create-react-app, npm start fails.



I have tried this using node 11.4 and 10.4 (npm 6.4.1)



>npm install create-react-app -g
>create-react-app t2
>cd t2
>npm start


expected: to be able to start simple react server to hit in browser at localhost:3000



actual: server did not start, got this in my terminal
Salvatores-iMac:t2 samr$ npm start




t2@0.1.0 start /Users/samr/dev/githubs/react/t2
react-scripts start




/Users/samr/dev/githubs/react/t2/node_modules/ajv/lib/keyword.js:65
throw new Error('custom keyword definition is invalid: ' + this.errorsText(validateDefinition.errors));
^



Error: custom keyword definition is invalid: data.errors should be boolean
at Ajv.addKeyword (/Users/samr/dev/githubs/react/t2/node_modules/ajv/lib/keyword.js:65:13)
at module.exports (/Users/samr/dev/githubs/react/t2/node_modules/ajv-errors/index.js:10:7)
at Object. (/Users/samr/dev/githubs/react/t2/node_modules/schema-utils/src/validateOptions.js:22:1)
at Module._compile (internal/modules/cjs/loader.js:723:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:734:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Module.require (internal/modules/cjs/loader.js:659:17)
at require (internal/modules/cjs/helpers.js:22:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! t2@0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the t2@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! /Users/samr/.npm/_logs/2019-02-09T23_19_40_848Z-debug.log










share|improve this question







New contributor




javazen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Looks like a known issue: github.com/webpack/webpack/issues/8768

    – Lambda Fairy
    3 hours ago














6












6








6


1






After I create a sample react app using create-react-app, npm start fails.



I have tried this using node 11.4 and 10.4 (npm 6.4.1)



>npm install create-react-app -g
>create-react-app t2
>cd t2
>npm start


expected: to be able to start simple react server to hit in browser at localhost:3000



actual: server did not start, got this in my terminal
Salvatores-iMac:t2 samr$ npm start




t2@0.1.0 start /Users/samr/dev/githubs/react/t2
react-scripts start




/Users/samr/dev/githubs/react/t2/node_modules/ajv/lib/keyword.js:65
throw new Error('custom keyword definition is invalid: ' + this.errorsText(validateDefinition.errors));
^



Error: custom keyword definition is invalid: data.errors should be boolean
at Ajv.addKeyword (/Users/samr/dev/githubs/react/t2/node_modules/ajv/lib/keyword.js:65:13)
at module.exports (/Users/samr/dev/githubs/react/t2/node_modules/ajv-errors/index.js:10:7)
at Object. (/Users/samr/dev/githubs/react/t2/node_modules/schema-utils/src/validateOptions.js:22:1)
at Module._compile (internal/modules/cjs/loader.js:723:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:734:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Module.require (internal/modules/cjs/loader.js:659:17)
at require (internal/modules/cjs/helpers.js:22:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! t2@0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the t2@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! /Users/samr/.npm/_logs/2019-02-09T23_19_40_848Z-debug.log










share|improve this question







New contributor




javazen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












After I create a sample react app using create-react-app, npm start fails.



I have tried this using node 11.4 and 10.4 (npm 6.4.1)



>npm install create-react-app -g
>create-react-app t2
>cd t2
>npm start


expected: to be able to start simple react server to hit in browser at localhost:3000



actual: server did not start, got this in my terminal
Salvatores-iMac:t2 samr$ npm start




t2@0.1.0 start /Users/samr/dev/githubs/react/t2
react-scripts start




/Users/samr/dev/githubs/react/t2/node_modules/ajv/lib/keyword.js:65
throw new Error('custom keyword definition is invalid: ' + this.errorsText(validateDefinition.errors));
^



Error: custom keyword definition is invalid: data.errors should be boolean
at Ajv.addKeyword (/Users/samr/dev/githubs/react/t2/node_modules/ajv/lib/keyword.js:65:13)
at module.exports (/Users/samr/dev/githubs/react/t2/node_modules/ajv-errors/index.js:10:7)
at Object. (/Users/samr/dev/githubs/react/t2/node_modules/schema-utils/src/validateOptions.js:22:1)
at Module._compile (internal/modules/cjs/loader.js:723:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:734:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Module.require (internal/modules/cjs/loader.js:659:17)
at require (internal/modules/cjs/helpers.js:22:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! t2@0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the t2@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! /Users/samr/.npm/_logs/2019-02-09T23_19_40_848Z-debug.log







reactjs create-react-app






share|improve this question







New contributor




javazen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




javazen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




javazen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 4 hours ago









javazenjavazen

334




334




New contributor




javazen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





javazen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






javazen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • Looks like a known issue: github.com/webpack/webpack/issues/8768

    – Lambda Fairy
    3 hours ago



















  • Looks like a known issue: github.com/webpack/webpack/issues/8768

    – Lambda Fairy
    3 hours ago

















Looks like a known issue: github.com/webpack/webpack/issues/8768

– Lambda Fairy
3 hours ago





Looks like a known issue: github.com/webpack/webpack/issues/8768

– Lambda Fairy
3 hours ago












6 Answers
6






active

oldest

votes


















3














Quick fix is mentioned here https://github.com/webpack/webpack/issues/8768



Essentially go to node_modules/ajv/lib/keyword.js and comment out lines 64 and 65.






share|improve this answer
























  • There is no ajv folder in my node_modules directory

    – Abel Agoi
    3 hours ago



















2














As @atsnam has said, you can find the resolution here https://github.com/webpack/webpack/issues/8768.



If you use yarn



add below to package.json



"resolutions": {
"ajv": "6.8.1"
}


then run yarn install



if you use npm



npm uninstall ajv
npm install ajv@6.8.1


That worked for me






share|improve this answer































    0














    I'm running into this as well. Npm start worked fine for me for an app I created last night, but today I tried to use create-react-app for a new project, and in the new project npm start is not working for me.



    Copying over my node_modules folder from my previous app did help as a temporary workaround, but once I tried installing react router into my new app and then running npm start, I'm running into this error once again.






    share|improve this answer








    New contributor




    cathamatic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.




























      0














      same here, maybe you can check this https://github.com/webpack/webpack/issues/8768, changing the file in file node_modulesajv-errorsindex.js as someone says here solved it for now as a quick fix






      share|improve this answer








      New contributor




      PepitoPompin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




























        0














        As per the suggestion in Github answers the below change has enabled me to work.



        To fix this error, just change:
        Line 14: `errors: 'full',`
        to:
        Line 14: `errors: true`
        in file **node_modulesajv-errorsindex.js**





        share|improve this answer































          0














          I am getting the same error
          this worked for me



          just add



            "resolutions": {
          "ajv": "6.8.1"
          }


          to your package.json



          if you use yarn:
          run yarn install






          share|improve this answer


























          • I added this, did the npm install, but npm start still fails the same way.

            – javazen
            2 hours ago










          protected by Community 3 hours ago



          Thank you for your interest in this question.
          Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



          Would you like to answer one of these unanswered questions instead?














          6 Answers
          6






          active

          oldest

          votes








          6 Answers
          6






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3














          Quick fix is mentioned here https://github.com/webpack/webpack/issues/8768



          Essentially go to node_modules/ajv/lib/keyword.js and comment out lines 64 and 65.






          share|improve this answer
























          • There is no ajv folder in my node_modules directory

            – Abel Agoi
            3 hours ago
















          3














          Quick fix is mentioned here https://github.com/webpack/webpack/issues/8768



          Essentially go to node_modules/ajv/lib/keyword.js and comment out lines 64 and 65.






          share|improve this answer
























          • There is no ajv folder in my node_modules directory

            – Abel Agoi
            3 hours ago














          3












          3








          3







          Quick fix is mentioned here https://github.com/webpack/webpack/issues/8768



          Essentially go to node_modules/ajv/lib/keyword.js and comment out lines 64 and 65.






          share|improve this answer













          Quick fix is mentioned here https://github.com/webpack/webpack/issues/8768



          Essentially go to node_modules/ajv/lib/keyword.js and comment out lines 64 and 65.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 3 hours ago









          atsnamatsnam

          12417




          12417













          • There is no ajv folder in my node_modules directory

            – Abel Agoi
            3 hours ago



















          • There is no ajv folder in my node_modules directory

            – Abel Agoi
            3 hours ago

















          There is no ajv folder in my node_modules directory

          – Abel Agoi
          3 hours ago





          There is no ajv folder in my node_modules directory

          – Abel Agoi
          3 hours ago













          2














          As @atsnam has said, you can find the resolution here https://github.com/webpack/webpack/issues/8768.



          If you use yarn



          add below to package.json



          "resolutions": {
          "ajv": "6.8.1"
          }


          then run yarn install



          if you use npm



          npm uninstall ajv
          npm install ajv@6.8.1


          That worked for me






          share|improve this answer




























            2














            As @atsnam has said, you can find the resolution here https://github.com/webpack/webpack/issues/8768.



            If you use yarn



            add below to package.json



            "resolutions": {
            "ajv": "6.8.1"
            }


            then run yarn install



            if you use npm



            npm uninstall ajv
            npm install ajv@6.8.1


            That worked for me






            share|improve this answer


























              2












              2








              2







              As @atsnam has said, you can find the resolution here https://github.com/webpack/webpack/issues/8768.



              If you use yarn



              add below to package.json



              "resolutions": {
              "ajv": "6.8.1"
              }


              then run yarn install



              if you use npm



              npm uninstall ajv
              npm install ajv@6.8.1


              That worked for me






              share|improve this answer













              As @atsnam has said, you can find the resolution here https://github.com/webpack/webpack/issues/8768.



              If you use yarn



              add below to package.json



              "resolutions": {
              "ajv": "6.8.1"
              }


              then run yarn install



              if you use npm



              npm uninstall ajv
              npm install ajv@6.8.1


              That worked for me







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered 1 hour ago









              aquilesbaquilesb

              1865




              1865























                  0














                  I'm running into this as well. Npm start worked fine for me for an app I created last night, but today I tried to use create-react-app for a new project, and in the new project npm start is not working for me.



                  Copying over my node_modules folder from my previous app did help as a temporary workaround, but once I tried installing react router into my new app and then running npm start, I'm running into this error once again.






                  share|improve this answer








                  New contributor




                  cathamatic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.

























                    0














                    I'm running into this as well. Npm start worked fine for me for an app I created last night, but today I tried to use create-react-app for a new project, and in the new project npm start is not working for me.



                    Copying over my node_modules folder from my previous app did help as a temporary workaround, but once I tried installing react router into my new app and then running npm start, I'm running into this error once again.






                    share|improve this answer








                    New contributor




                    cathamatic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.























                      0












                      0








                      0







                      I'm running into this as well. Npm start worked fine for me for an app I created last night, but today I tried to use create-react-app for a new project, and in the new project npm start is not working for me.



                      Copying over my node_modules folder from my previous app did help as a temporary workaround, but once I tried installing react router into my new app and then running npm start, I'm running into this error once again.






                      share|improve this answer








                      New contributor




                      cathamatic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.










                      I'm running into this as well. Npm start worked fine for me for an app I created last night, but today I tried to use create-react-app for a new project, and in the new project npm start is not working for me.



                      Copying over my node_modules folder from my previous app did help as a temporary workaround, but once I tried installing react router into my new app and then running npm start, I'm running into this error once again.







                      share|improve this answer








                      New contributor




                      cathamatic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.









                      share|improve this answer



                      share|improve this answer






                      New contributor




                      cathamatic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.









                      answered 3 hours ago









                      cathamaticcathamatic

                      1




                      1




                      New contributor




                      cathamatic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.





                      New contributor





                      cathamatic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.






                      cathamatic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.























                          0














                          same here, maybe you can check this https://github.com/webpack/webpack/issues/8768, changing the file in file node_modulesajv-errorsindex.js as someone says here solved it for now as a quick fix






                          share|improve this answer








                          New contributor




                          PepitoPompin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.

























                            0














                            same here, maybe you can check this https://github.com/webpack/webpack/issues/8768, changing the file in file node_modulesajv-errorsindex.js as someone says here solved it for now as a quick fix






                            share|improve this answer








                            New contributor




                            PepitoPompin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.























                              0












                              0








                              0







                              same here, maybe you can check this https://github.com/webpack/webpack/issues/8768, changing the file in file node_modulesajv-errorsindex.js as someone says here solved it for now as a quick fix






                              share|improve this answer








                              New contributor




                              PepitoPompin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.










                              same here, maybe you can check this https://github.com/webpack/webpack/issues/8768, changing the file in file node_modulesajv-errorsindex.js as someone says here solved it for now as a quick fix







                              share|improve this answer








                              New contributor




                              PepitoPompin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.









                              share|improve this answer



                              share|improve this answer






                              New contributor




                              PepitoPompin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.









                              answered 3 hours ago









                              PepitoPompinPepitoPompin

                              11




                              11




                              New contributor




                              PepitoPompin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.





                              New contributor





                              PepitoPompin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.






                              PepitoPompin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.























                                  0














                                  As per the suggestion in Github answers the below change has enabled me to work.



                                  To fix this error, just change:
                                  Line 14: `errors: 'full',`
                                  to:
                                  Line 14: `errors: true`
                                  in file **node_modulesajv-errorsindex.js**





                                  share|improve this answer




























                                    0














                                    As per the suggestion in Github answers the below change has enabled me to work.



                                    To fix this error, just change:
                                    Line 14: `errors: 'full',`
                                    to:
                                    Line 14: `errors: true`
                                    in file **node_modulesajv-errorsindex.js**





                                    share|improve this answer


























                                      0












                                      0








                                      0







                                      As per the suggestion in Github answers the below change has enabled me to work.



                                      To fix this error, just change:
                                      Line 14: `errors: 'full',`
                                      to:
                                      Line 14: `errors: true`
                                      in file **node_modulesajv-errorsindex.js**





                                      share|improve this answer













                                      As per the suggestion in Github answers the below change has enabled me to work.



                                      To fix this error, just change:
                                      Line 14: `errors: 'full',`
                                      to:
                                      Line 14: `errors: true`
                                      in file **node_modulesajv-errorsindex.js**






                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered 3 hours ago









                                      VaradVarad

                                      495413




                                      495413























                                          0














                                          I am getting the same error
                                          this worked for me



                                          just add



                                            "resolutions": {
                                          "ajv": "6.8.1"
                                          }


                                          to your package.json



                                          if you use yarn:
                                          run yarn install






                                          share|improve this answer


























                                          • I added this, did the npm install, but npm start still fails the same way.

                                            – javazen
                                            2 hours ago
















                                          0














                                          I am getting the same error
                                          this worked for me



                                          just add



                                            "resolutions": {
                                          "ajv": "6.8.1"
                                          }


                                          to your package.json



                                          if you use yarn:
                                          run yarn install






                                          share|improve this answer


























                                          • I added this, did the npm install, but npm start still fails the same way.

                                            – javazen
                                            2 hours ago














                                          0












                                          0








                                          0







                                          I am getting the same error
                                          this worked for me



                                          just add



                                            "resolutions": {
                                          "ajv": "6.8.1"
                                          }


                                          to your package.json



                                          if you use yarn:
                                          run yarn install






                                          share|improve this answer















                                          I am getting the same error
                                          this worked for me



                                          just add



                                            "resolutions": {
                                          "ajv": "6.8.1"
                                          }


                                          to your package.json



                                          if you use yarn:
                                          run yarn install







                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited 3 hours ago

























                                          answered 3 hours ago









                                          nik.ssnik.ss

                                          12




                                          12













                                          • I added this, did the npm install, but npm start still fails the same way.

                                            – javazen
                                            2 hours ago



















                                          • I added this, did the npm install, but npm start still fails the same way.

                                            – javazen
                                            2 hours ago

















                                          I added this, did the npm install, but npm start still fails the same way.

                                          – javazen
                                          2 hours ago





                                          I added this, did the npm install, but npm start still fails the same way.

                                          – javazen
                                          2 hours ago





                                          protected by Community 3 hours ago



                                          Thank you for your interest in this question.
                                          Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                          Would you like to answer one of these unanswered questions instead?



                                          Popular posts from this blog

                                          What other Star Trek series did the main TNG cast show up in?

                                          Berlina muro

                                          Berlina aerponto