@hapi/joi 报错 “message“: “Cannot mix different versions of joi schemas“
@hapi/joi 报错 “message“: “Cannot mix different versions of joi schemas“最近node项目中接触到了便捷式的检验工具包@hapi/joi,但在使用过程中将它放到错误级中间件去抛出错误时发现与预期的报错不同,@hapi/joi 老是报错“message“: “Cannot mix different versions of joi s
·
@hapi/joi 报错 “message“: “Cannot mix different versions of joi schemas“
最近node项目中接触到了便捷式的检验工具包@hapi/joi,但在使用过程中将它放到错误级中间件去抛出错误时发现与预期的报错不同,@hapi/joi 老是报错
“message“: “Cannot mix different versions of joi schemas“。
问题: 使用 @hapi/joi 报错 “message”: “Cannot mix different versions of joi schemas”


解决办法以及途径
随后我去npm官网里去看看 @hapi/joi 的使用手册,发现这个包已经弃用,并更新为其他的包了:
于是我重新下载并使用了joi这个包,
npm i joi
后面使用就正常啦。
更多推荐


所有评论(0)