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 ...
随机推荐
- Xadmin的实现
一.启动 1.前提 配置setting.py文件 INSTALLED_APPS 2.定位Xadmin,找到对应的类 'Xadmin.apps.XadminConfig', 3.根据admin源码,实现 ...
- Commvault逻辑架构及组件说明
在学习和使用Commvault软件的过程中,经常会碰到一些术语和缩写,初学者可能并不是很清楚这些术语和缩写的具体含义,接下来我们梳理一下Commvault软件中这些属于和缩写的含义,有可能一次不能梳理 ...
- HDU-2647 Reward(链式前向星+拓扑排序)
Reward Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submis ...
- POI导出excel的三种方式
原文链接:https://www.cnblogs.com/zhaoblog/p/7661245.html poi导出excel最常用的是第一种方式HSSFWorkbook,不过这种方式数据量大的话会产 ...
- linux 命令全名
su:Swith user 切换用户,切换到root用户cat: Concatenate 串联uname: Unix name 系统名称df: Disk free 空余硬盘du: Disk u ...
- 关于Influxdb1.4.2在windows下的安装过程的一些问题的记录
一.安装与配置: 1. Influxdb在1.3以后版本已经关闭了内置 的8086的web管理功能,需要单独的工具来管理 2.其配置文件默认路径是linux格式,需要修改为本机windows格式 我的 ...
- [求解!!!] springboot在运行web项目时报错
2017-05-10 17:40:54.343 INFO 4852 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing ...
- FFMPEG结构体分析:AVCodecParameters
/** * This struct describes the properties of an encoded stream. * * sizeof(AVCodecParameters) is no ...
- Simscape Multibody 教程 —— 入门学习
写在前面 本文要点: Simscape Multibody 简介 Simscape Multibody 入门学习的推荐学习材料和学习顺序 建模仿真过程中的重要知识 模型的参数设置(Model Work ...
- Python爬虫小结
有些数据是没有专门的数据集的,为了找到神经网络训练的数据,自然而然的想到了用爬虫的方法开始采集数据.一开始采用了网上的一个动态爬虫的代码,发现爬取的图片大多是重复的,有效图片很少. 动态爬虫: fro ...