-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug:DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead. #658
Comments
遇到同样的问题 无法完成安装 期待解决 |
我是先安装旧版本,然后按指导进行升级: |
我改成1.3.23 就可以了 windows下 |
怎么解决的啊?? |
Error: (node:24613) UnhandledPromiseRejectionWarning: Error: 初始化管理员账号 "[email protected]" 失败, E11000 duplicate key error index: yapi.user.$email_1 dup key: { : "[email protected]" } at /www/wwwroot/tc-yapi/vendors/server/install.js:146:17 at process._tickCallback (internal/process/next_tick.js:68:7) |
3Q |
版本号
1.4.1
什么问题
这个版本依赖的mongoose库存在bug,解决方法参考:
Automattic/mongoose#6880
如何复现此问题
部署yapi就会出现,运行yapi server,
然后去web界面上输入相关信息后,就会报错:
DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
安装1.3.23正常,看了一下,1.3.23依赖的是 "mongoose": "4.7.0",
而1.4.1依赖的是 "mongoose": "5.3.2",
麻烦参考官方文档修复一下这个bug
什么浏览器
~
什么系统(Linux, Windows, macOS)
Centos
The text was updated successfully, but these errors were encountered: