Skip to content
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

Open
youbl opened this issue Nov 22, 2018 · 6 comments

Comments

@youbl
Copy link

youbl commented Nov 22, 2018

版本号

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

@youbl youbl changed the title Bug Bug:DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead. Nov 22, 2018
@WannerZoer
Copy link

遇到同样的问题 无法完成安装 期待解决

@youbl
Copy link
Author

youbl commented Nov 23, 2018

我是先安装旧版本,然后按指导进行升级:
https://yapi.ymfe.org/devops/index.html#%E5%8D%87%E7%BA%A7

This was referenced Nov 26, 2018
@liwl
Copy link

liwl commented Dec 3, 2018

我改成1.3.23 就可以了 windows下

@JefferShell
Copy link

怎么解决的啊??

@qingyunzs
Copy link

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)

@jimwong666
Copy link

3Q

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants