mongoose报错:DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
mongoose报错:(node:15689) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
解决办法:
//连接数据库
mongoose.set('useCreateIndex', true) //加上这个
mongoose.connect(db, { useNewUrlParser: true })
mongoose报错:DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.的更多相关文章
- mongoose报错:DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead
参考:mongoose报错:DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead mo ...
- mongoose 报错:DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead
mongoose.set('useCreateIndex', true) // 加上这个
- [未解决]报错:DeprecationWarning: decodestring() is a deprecated alias since Python 3.1, use decodebytes()
DeprecationWarning: decodestring() is a deprecated alias since Python 3.1, use decodebytes()
- 【PHP】php7.2报错The each() function is deprecated. This message will be suppressed on furthe
php7.2以上 废除了 each()方法,项目中用到的地方会出现以下报错 The each() function is deprecated. This message will be suppre ...
- phpredis 报错 “Function Redis::setTimeout() is deprecated” 解决方法
项目在本地开发过程中抛出异常: Function Redis::setTimeout() is deprecated 找到出错代码: <?php use Illuminate\Support\F ...
- Vivado_HLS 编译报错error: AP_STREAM macros are deprecated
D:/vivado2018.3/Vivado/2018.3/common/technology/autopilot\ap_stream.h:62:2: error: AP_STREAM macros ...
- DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead extract-text-webpack-plugin 提取css报错
深入浅出Webpack 1-5 使用pulugin extract-text-webpack-plugin 提取css报错 DeprecationWarning: Tapable.plugin is ...
- mybatis报错Mapped Statements collection does not contain value for com.inter.IOper
首页 > 精品文库 > mybatis报错Mapped Statements collection does not contain value for com.inter.IOper m ...
- php报错日志:PHP Deprecated:Automatically populating $HTTP_RAW_POST_DATA is deprecated
前几天将线上php服务升级到5.6.x版本后,php-error.log报出错误:PHP Deprecated: Automatically populating $HTTP_RAW_POST_DAT ...
随机推荐
- 【5min+】传说中的孪生兄弟? Memory and Span
系列介绍 [五分钟的dotnet]是一个利用您的碎片化时间来学习和丰富.net知识的博文系列.它所包含了.net体系中可能会涉及到的方方面面,比如C#的小细节,AspnetCore,微服务中的.net ...
- 从0开发3D引擎(七):学习Reason语言
目录 上一篇博文 介绍Reason Reason的优势 如何学习Reason? 介绍Reason的部分知识点 大家好,本文介绍Reason语言以及学习Reason的方法. 上一篇博文 从0开发3D引擎 ...
- Linux网络文件共享服务之NFS
一.NFS服务简介 NFS全称network file system 网络文件系统,基于内核的文件系统,有sun公司开发,通过使用NFS,用户和程序可以像访问本地文件一样访问远端系统上的文件,它基于r ...
- 个人第4次作业—Alpha项目测试
这个作业属于哪个课程 课程链接 这个作业要求在哪里 作业要求 团队名称 CTRL_IKUN(团队博客) 这个作业的目标 对非本小组的三个项目进行软件测试 一.测试人员个人信息 学号 201731032 ...
- 优雅写Java之二(数组集合流)
一.数组 二.集合 三.流 学习整理中,本文待补充--
- CentOS7.0+Hadoop2.7.2+Hbase1.2.1搭建教程
1.软件版本 CentOS-7.0-1406-x86_64-DVD.iso jdk-7u80-linux-x64.tar.gz hadoop-2.7.2.tar.gz hbase-1.2.1-bin. ...
- Docker底层架构之简介
简介 Docker 底层的核心技术包括 Linux 上的命名空间(Namespaces) 控制组(Control groups) Union 文件系统(Union file systems) 容器格式 ...
- 使用shiro 框架 报错No WebApplicationContext found: no ContextLoaderListener or DispatcherServlet registered?
1.问题描述:ssm 框架中使用shiro 中出现问题 原来web.xml 文件如下: <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, ...
- java容器(二) Map类框架图解
- 不停机替换线上代码? 你没听错,Arthas它能做到
写在前边 有没有这样一种感受,自己写的代码在开发.测试环境跑的稳得一笔,可一到线上就抽风,不是缺这个就是少那个反正就是一顿报错,线上调试代码又很麻烦,让人头疼得很.阿里巴巴出了一款名叫Arthas的工 ...