@hapi/joi 报错 “message“: “Cannot mix different versions of joi schemas“
问题: 使用 @hapi/joi 报错 “message”: “Cannot mix different versions of joi schemas”
npm install @hapi/joi@17.1.0npm i @escook/express-joi
// 导入 定义验证规则的包
const joi = require('@hapi/joi');//定义 用户名和密码验证规则
const username = joi.string().alphanum().min(1).max(10).required();
const password = joi.string().pattern(/^[\S]{6,12}$/).required();
res返回:
{"status": 1,"message": "Cannot mix different versions of joi schemas"
}
查看 @hapi/joi 文档 :
这个程序包已经被弃用 改为 npm i joi
重新下载 joi
npm i joi
npm WARN big_event_api_server@1.0.0 No description
npm WARN big_event_api_server@1.0.0 No repository field.+ joi@17.4.1
updated 1 package in 1.283s
重新导入joi
// 导入 定义验证规则的包
const joi = require('joi');//定义 用户名和密码验证规则
const username = joi.string().alphanum().min(1).max(10).required();
const password = joi.string().pattern(/^[\S]{6,12}$/).required();
@hapi/joi 报错 “message“: “Cannot mix different versions of joi schemas“相关推荐
- 【报错】Cannot mix different versions of joi schemas(Postman)
错误显示(Postman): "Cannot mix different versions of joi schemas",即"无法混合不同版本的 joi 模式" ...
- Cannot mix different versions of joi schemas
问题内容:使用 @hapi/joi 报错 "message": "Cannot mix different versions of joi schemas" 问 ...
- selenium headless报错Message: unknown error: failed to wait for extension background page to load
完整报错是: selenium.common.exceptions.WebDriverException: Message: unknown error: failed to wait for ext ...
- 报错:Illegal mix of collations
问题: 服务端报错:Error: ER_CANT_AGGREGATE_2COLLATIONS: Illegal mix of collations (latin1_swedish_ci,IMPLICI ...
- logstash-plugin install报错message: certificate verify failed
使用logstash-plugin install logstash-input-jdbc插件时报错 命令和报错如下 ERROR: Something went wrong when installi ...
- idea Tomcat启动项目报错 Message: 前言中不允许有内容,等其它问题
创建测试项目 1.创建Maven项目 2.创建Maven子工程 3.子工程添加web 4.父级pom.xml导包 <dependencies><dependency><g ...
- hive metastore日志中报错message:Metastore contains multiple versions
hive metastore日志中报错: Exception in thread "main" java.lang.RuntimeException: java.lang.Runt ...
- idea 新建/导入的xml 报文头报错 URI is not registered (Settings | Languages Frameworks | Schemas and DTDs)...
我们在新创建项目或是新添加xml文件时,项目会出现xmlns变红色 解决方法如下: 1.粘贴报错的地址,打开idea Settings ->Languages & Frameworks ...
- Cannot mix different versions of joi schemas报错解决方案
使用第三方包@hapi/joi 定义表单验证规则,报错了,是因为@hapi/joi 第三方包不可用,版本更新了,所以之前的用不了了 重装npm i joi 重新导入验证模块,将const joi = ...
最新文章
- API Gateways – An Evaluation of Zuul 2
- 美团配送A/B评估体系建设与实践
- P6348 [PA2011]Journeys 线段树优化建图 区间连区间
- 为什么“how to say”是错的?
- oracle 生成随机姓名_Oracle 生成随机数,随机字符串
- wxWidgets第四课 EVT_LEFT_UP关联鼠标弹起事件不生效
- HDFS的dfs.replication不同验证
- IDEA切换使用的语言
- 千年3步法外挂 千年3脚本 千年3外挂 千年3最新外挂
- python -- 计算 平方、乘方、平方根_python如何求平方
- 抢滩新零售混战 实力战将才不惧双十一 附:双十一红包雨时间表
- 对小波变换中DWT和CWT的理解
- Android 网页无法访问
- 【常垒·投资】芯率智能完成A轮融资
- saas平台 saas服务 什么是saas
- Android安装App出现:“该文件包与具有同一名称的现有文件包存在冲突”的解决方法
- 【西电—英美国家概况(英美概况/英美文化)2023第一学期】第十章参考课后答案
- YEP_fpssynchoption
- 真势模态逻辑中的排中律
- MT6757(P25)用的ddr3 4+128内存,手机重启
热门文章
- Java语言高级(第三部分)异常多线程 ->(个人学习记录笔记)
- linux用命令开触摸板,centos 6 linux下禁用触摸板(通过命令行实现)
- MySQL必须知道的点
- WebGL 是什么?
- flvplayer.swf flv视频播放器使用方法 (转载)
- 即时聊天app开发有哪些功能?3种类型盈利模式解读
- 新时达工业机器人技术储备_国内外工业机器人发展现状-工业机器人技术国内外发展现状与趋势...
- 教你制作一张漂亮的城市分布图 比如加油站分布地图
- 【路由协议】和【应用协议】
- R语言read.xlsx( )函数报错 LoadLibrary failure: %1 不是有效的 Win32 应用程序