Error “custom keyword definition is invalid: data.errors should be boolean”





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







18















I just created a new React application using this command:



create-react-app mysite.com


After installation, when I tried to open it using npm start and yarn start, I got the following error.



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/myAccount/Documents/Dev/Projects/ReactJS/mysite.com/node_modules/ajv/lib/keyword.js:65:13)


How can I fix this problem?










share|improve this question

























  • Not sure, but maybe dots are not allowed in project names? That would probably cause such an error...

    – Luan Nico
    Feb 9 at 23:12











  • Thank you @Luan, I just created a new app with no dots and no capital letters: create-react-app profilesite, but it's still giving me same error.

    – Ishan Patel
    Feb 9 at 23:17











  • You could also try to update your global installation of create-react-app to the latest version, or at least check in which version you are. Again, just a guess.

    – Luan Nico
    Feb 9 at 23:18


















18















I just created a new React application using this command:



create-react-app mysite.com


After installation, when I tried to open it using npm start and yarn start, I got the following error.



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/myAccount/Documents/Dev/Projects/ReactJS/mysite.com/node_modules/ajv/lib/keyword.js:65:13)


How can I fix this problem?










share|improve this question

























  • Not sure, but maybe dots are not allowed in project names? That would probably cause such an error...

    – Luan Nico
    Feb 9 at 23:12











  • Thank you @Luan, I just created a new app with no dots and no capital letters: create-react-app profilesite, but it's still giving me same error.

    – Ishan Patel
    Feb 9 at 23:17











  • You could also try to update your global installation of create-react-app to the latest version, or at least check in which version you are. Again, just a guess.

    – Luan Nico
    Feb 9 at 23:18














18












18








18


1






I just created a new React application using this command:



create-react-app mysite.com


After installation, when I tried to open it using npm start and yarn start, I got the following error.



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/myAccount/Documents/Dev/Projects/ReactJS/mysite.com/node_modules/ajv/lib/keyword.js:65:13)


How can I fix this problem?










share|improve this question
















I just created a new React application using this command:



create-react-app mysite.com


After installation, when I tried to open it using npm start and yarn start, I got the following error.



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/myAccount/Documents/Dev/Projects/ReactJS/mysite.com/node_modules/ajv/lib/keyword.js:65:13)


How can I fix this problem?







reactjs create-react-app ajv






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 10 at 9:11









Peter Mortensen

13.9k1987113




13.9k1987113










asked Feb 9 at 23:10









Ishan PatelIshan Patel

7421826




7421826













  • Not sure, but maybe dots are not allowed in project names? That would probably cause such an error...

    – Luan Nico
    Feb 9 at 23:12











  • Thank you @Luan, I just created a new app with no dots and no capital letters: create-react-app profilesite, but it's still giving me same error.

    – Ishan Patel
    Feb 9 at 23:17











  • You could also try to update your global installation of create-react-app to the latest version, or at least check in which version you are. Again, just a guess.

    – Luan Nico
    Feb 9 at 23:18



















  • Not sure, but maybe dots are not allowed in project names? That would probably cause such an error...

    – Luan Nico
    Feb 9 at 23:12











  • Thank you @Luan, I just created a new app with no dots and no capital letters: create-react-app profilesite, but it's still giving me same error.

    – Ishan Patel
    Feb 9 at 23:17











  • You could also try to update your global installation of create-react-app to the latest version, or at least check in which version you are. Again, just a guess.

    – Luan Nico
    Feb 9 at 23:18

















Not sure, but maybe dots are not allowed in project names? That would probably cause such an error...

– Luan Nico
Feb 9 at 23:12





Not sure, but maybe dots are not allowed in project names? That would probably cause such an error...

– Luan Nico
Feb 9 at 23:12













Thank you @Luan, I just created a new app with no dots and no capital letters: create-react-app profilesite, but it's still giving me same error.

– Ishan Patel
Feb 9 at 23:17





Thank you @Luan, I just created a new app with no dots and no capital letters: create-react-app profilesite, but it's still giving me same error.

– Ishan Patel
Feb 9 at 23:17













You could also try to update your global installation of create-react-app to the latest version, or at least check in which version you are. Again, just a guess.

– Luan Nico
Feb 9 at 23:18





You could also try to update your global installation of create-react-app to the latest version, or at least check in which version you are. Again, just a guess.

– Luan Nico
Feb 9 at 23:18












4 Answers
4






active

oldest

votes


















25














Reverting to a stable version of the ajv library also works:



npm uninstall ajv
npm install ajv@6.8.1





share|improve this answer

































    10














    I thought that was something new coming with "@symfony/webpack-encore": "^0.23.0". However, there's an issue with the ajv library.



    Dirty fix:



    In




    node_modulesajv-errorsindex.js




    change the errors: parameter at line 14 from 'full' to true.



    Clean fix (temporary):



    Modify your package.json using this:



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





    share|improve this answer





















    • 1





      your clean fix should above your dirty fix imo, and this is the best answer to fix this (the clean fix version)

      – Ryan Castner
      Feb 10 at 1:35



















    9














    Comment out node_modules/ajv/lib/keyword.js at line 64-65 for a workaround solution:



    if (!validateDefinition(definition))
    throw new Error('custom keyword definition is invalid: ' + this.errorsText(validateDefinition.errors));


    Ref: https://github.com/webpack/webpack/issues/8768






    share|improve this answer































      3














      I get this error when I try and make a new nuxt application with npx:



      npx create-nuxt-app <project-name>


      I did



      npm uninstall ajv
      npm install ajv@6.8.1


      Like @robert Rodriguez, it works, no errors.






      share|improve this answer


























      • I'm not going to downvote but what does this answer add to Robert Rodriguez's one?

        – les
        Feb 10 at 17:55











      • For starters confirmation that it works. 2nd that React isn't the only place where this error is popping up. I'm using Nuxt and not React, maybe someone who looks up this issue for a Nuxt project they will find this helpful. 3rd His solution is simple and does not involve tweaking ajv package files. Please let us know Les if you have a better solution to this issue. I would like to see it. Thanks!

        – Justin
        Feb 10 at 21:06













      • Ok thanks for the explanation, I'm sorry for bothering. (I don't have any other solution).

        – les
        Feb 11 at 19:03












      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%2f54611735%2ferror-custom-keyword-definition-is-invalid-data-errors-should-be-boolean%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      25














      Reverting to a stable version of the ajv library also works:



      npm uninstall ajv
      npm install ajv@6.8.1





      share|improve this answer






























        25














        Reverting to a stable version of the ajv library also works:



        npm uninstall ajv
        npm install ajv@6.8.1





        share|improve this answer




























          25












          25








          25







          Reverting to a stable version of the ajv library also works:



          npm uninstall ajv
          npm install ajv@6.8.1





          share|improve this answer















          Reverting to a stable version of the ajv library also works:



          npm uninstall ajv
          npm install ajv@6.8.1






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 10 at 9:13









          Peter Mortensen

          13.9k1987113




          13.9k1987113










          answered Feb 10 at 1:28









          Roberto RodriguezRoberto Rodriguez

          1,1191421




          1,1191421

























              10














              I thought that was something new coming with "@symfony/webpack-encore": "^0.23.0". However, there's an issue with the ajv library.



              Dirty fix:



              In




              node_modulesajv-errorsindex.js




              change the errors: parameter at line 14 from 'full' to true.



              Clean fix (temporary):



              Modify your package.json using this:



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





              share|improve this answer





















              • 1





                your clean fix should above your dirty fix imo, and this is the best answer to fix this (the clean fix version)

                – Ryan Castner
                Feb 10 at 1:35
















              10














              I thought that was something new coming with "@symfony/webpack-encore": "^0.23.0". However, there's an issue with the ajv library.



              Dirty fix:



              In




              node_modulesajv-errorsindex.js




              change the errors: parameter at line 14 from 'full' to true.



              Clean fix (temporary):



              Modify your package.json using this:



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





              share|improve this answer





















              • 1





                your clean fix should above your dirty fix imo, and this is the best answer to fix this (the clean fix version)

                – Ryan Castner
                Feb 10 at 1:35














              10












              10








              10







              I thought that was something new coming with "@symfony/webpack-encore": "^0.23.0". However, there's an issue with the ajv library.



              Dirty fix:



              In




              node_modulesajv-errorsindex.js




              change the errors: parameter at line 14 from 'full' to true.



              Clean fix (temporary):



              Modify your package.json using this:



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





              share|improve this answer















              I thought that was something new coming with "@symfony/webpack-encore": "^0.23.0". However, there's an issue with the ajv library.



              Dirty fix:



              In




              node_modulesajv-errorsindex.js




              change the errors: parameter at line 14 from 'full' to true.



              Clean fix (temporary):



              Modify your package.json using this:



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






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Feb 10 at 9:13









              Peter Mortensen

              13.9k1987113




              13.9k1987113










              answered Feb 10 at 0:24









              rnenciurnenciu

              1309




              1309








              • 1





                your clean fix should above your dirty fix imo, and this is the best answer to fix this (the clean fix version)

                – Ryan Castner
                Feb 10 at 1:35














              • 1





                your clean fix should above your dirty fix imo, and this is the best answer to fix this (the clean fix version)

                – Ryan Castner
                Feb 10 at 1:35








              1




              1





              your clean fix should above your dirty fix imo, and this is the best answer to fix this (the clean fix version)

              – Ryan Castner
              Feb 10 at 1:35





              your clean fix should above your dirty fix imo, and this is the best answer to fix this (the clean fix version)

              – Ryan Castner
              Feb 10 at 1:35











              9














              Comment out node_modules/ajv/lib/keyword.js at line 64-65 for a workaround solution:



              if (!validateDefinition(definition))
              throw new Error('custom keyword definition is invalid: ' + this.errorsText(validateDefinition.errors));


              Ref: https://github.com/webpack/webpack/issues/8768






              share|improve this answer




























                9














                Comment out node_modules/ajv/lib/keyword.js at line 64-65 for a workaround solution:



                if (!validateDefinition(definition))
                throw new Error('custom keyword definition is invalid: ' + this.errorsText(validateDefinition.errors));


                Ref: https://github.com/webpack/webpack/issues/8768






                share|improve this answer


























                  9












                  9








                  9







                  Comment out node_modules/ajv/lib/keyword.js at line 64-65 for a workaround solution:



                  if (!validateDefinition(definition))
                  throw new Error('custom keyword definition is invalid: ' + this.errorsText(validateDefinition.errors));


                  Ref: https://github.com/webpack/webpack/issues/8768






                  share|improve this answer













                  Comment out node_modules/ajv/lib/keyword.js at line 64-65 for a workaround solution:



                  if (!validateDefinition(definition))
                  throw new Error('custom keyword definition is invalid: ' + this.errorsText(validateDefinition.errors));


                  Ref: https://github.com/webpack/webpack/issues/8768







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 10 at 0:28









                  mobjectmobject

                  1193




                  1193























                      3














                      I get this error when I try and make a new nuxt application with npx:



                      npx create-nuxt-app <project-name>


                      I did



                      npm uninstall ajv
                      npm install ajv@6.8.1


                      Like @robert Rodriguez, it works, no errors.






                      share|improve this answer


























                      • I'm not going to downvote but what does this answer add to Robert Rodriguez's one?

                        – les
                        Feb 10 at 17:55











                      • For starters confirmation that it works. 2nd that React isn't the only place where this error is popping up. I'm using Nuxt and not React, maybe someone who looks up this issue for a Nuxt project they will find this helpful. 3rd His solution is simple and does not involve tweaking ajv package files. Please let us know Les if you have a better solution to this issue. I would like to see it. Thanks!

                        – Justin
                        Feb 10 at 21:06













                      • Ok thanks for the explanation, I'm sorry for bothering. (I don't have any other solution).

                        – les
                        Feb 11 at 19:03
















                      3














                      I get this error when I try and make a new nuxt application with npx:



                      npx create-nuxt-app <project-name>


                      I did



                      npm uninstall ajv
                      npm install ajv@6.8.1


                      Like @robert Rodriguez, it works, no errors.






                      share|improve this answer


























                      • I'm not going to downvote but what does this answer add to Robert Rodriguez's one?

                        – les
                        Feb 10 at 17:55











                      • For starters confirmation that it works. 2nd that React isn't the only place where this error is popping up. I'm using Nuxt and not React, maybe someone who looks up this issue for a Nuxt project they will find this helpful. 3rd His solution is simple and does not involve tweaking ajv package files. Please let us know Les if you have a better solution to this issue. I would like to see it. Thanks!

                        – Justin
                        Feb 10 at 21:06













                      • Ok thanks for the explanation, I'm sorry for bothering. (I don't have any other solution).

                        – les
                        Feb 11 at 19:03














                      3












                      3








                      3







                      I get this error when I try and make a new nuxt application with npx:



                      npx create-nuxt-app <project-name>


                      I did



                      npm uninstall ajv
                      npm install ajv@6.8.1


                      Like @robert Rodriguez, it works, no errors.






                      share|improve this answer















                      I get this error when I try and make a new nuxt application with npx:



                      npx create-nuxt-app <project-name>


                      I did



                      npm uninstall ajv
                      npm install ajv@6.8.1


                      Like @robert Rodriguez, it works, no errors.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Feb 10 at 9:13









                      Peter Mortensen

                      13.9k1987113




                      13.9k1987113










                      answered Feb 10 at 1:36









                      JustinJustin

                      1568




                      1568













                      • I'm not going to downvote but what does this answer add to Robert Rodriguez's one?

                        – les
                        Feb 10 at 17:55











                      • For starters confirmation that it works. 2nd that React isn't the only place where this error is popping up. I'm using Nuxt and not React, maybe someone who looks up this issue for a Nuxt project they will find this helpful. 3rd His solution is simple and does not involve tweaking ajv package files. Please let us know Les if you have a better solution to this issue. I would like to see it. Thanks!

                        – Justin
                        Feb 10 at 21:06













                      • Ok thanks for the explanation, I'm sorry for bothering. (I don't have any other solution).

                        – les
                        Feb 11 at 19:03



















                      • I'm not going to downvote but what does this answer add to Robert Rodriguez's one?

                        – les
                        Feb 10 at 17:55











                      • For starters confirmation that it works. 2nd that React isn't the only place where this error is popping up. I'm using Nuxt and not React, maybe someone who looks up this issue for a Nuxt project they will find this helpful. 3rd His solution is simple and does not involve tweaking ajv package files. Please let us know Les if you have a better solution to this issue. I would like to see it. Thanks!

                        – Justin
                        Feb 10 at 21:06













                      • Ok thanks for the explanation, I'm sorry for bothering. (I don't have any other solution).

                        – les
                        Feb 11 at 19:03

















                      I'm not going to downvote but what does this answer add to Robert Rodriguez's one?

                      – les
                      Feb 10 at 17:55





                      I'm not going to downvote but what does this answer add to Robert Rodriguez's one?

                      – les
                      Feb 10 at 17:55













                      For starters confirmation that it works. 2nd that React isn't the only place where this error is popping up. I'm using Nuxt and not React, maybe someone who looks up this issue for a Nuxt project they will find this helpful. 3rd His solution is simple and does not involve tweaking ajv package files. Please let us know Les if you have a better solution to this issue. I would like to see it. Thanks!

                      – Justin
                      Feb 10 at 21:06







                      For starters confirmation that it works. 2nd that React isn't the only place where this error is popping up. I'm using Nuxt and not React, maybe someone who looks up this issue for a Nuxt project they will find this helpful. 3rd His solution is simple and does not involve tweaking ajv package files. Please let us know Les if you have a better solution to this issue. I would like to see it. Thanks!

                      – Justin
                      Feb 10 at 21:06















                      Ok thanks for the explanation, I'm sorry for bothering. (I don't have any other solution).

                      – les
                      Feb 11 at 19:03





                      Ok thanks for the explanation, I'm sorry for bothering. (I don't have any other solution).

                      – les
                      Feb 11 at 19:03


















                      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%2f54611735%2ferror-custom-keyword-definition-is-invalid-data-errors-should-be-boolean%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

                      Human spaceflight

                      Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

                      張江高科駅