错误“自定义关键字定义无效:data.errors应该是布尔值” [英] Error "custom keyword definition is invalid: data.errors should be boolean"
本文介绍了错误“自定义关键字定义无效:data.errors应该是布尔值”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚使用以下命令创建了一个新的React应用程序:
I just created a new React application using this command:
create-react-app mysite.com
安装后,当我尝试使用 npm start
打开它时和 yarn start
,出现以下错误。
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)
如何修复
推荐答案
恢复到稳定版本的ajv库也有效:
Reverting to a stable version of the ajv library also works:
npm uninstall ajv
npm install ajv@6.8.1
这篇关于错误“自定义关键字定义无效:data.errors应该是布尔值”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文