nodejs连接MongoDB数据库运行时报错:(node:2728) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version.


错误提示如下:(node:2728) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.

 

 运行台报错如下

 

 

 解决方案:

 

 

 如图中红色标记,添加提示的内容,问题解决啦


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM