本文介绍了无效的mongodb uri必须以"mongodb://"开头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

知道为什么会出现此错误吗?

Any idea why i get this error?

这是连接线

mongoose.connect("mongodb+srv://danielkmx:"+process.env.MONGO_ATLAS_PW+"@node-rest-shop-5xfup.mongodb.net/test",
{
    useMongoClient:true
});

推荐答案

我遇到了相同的错误,当我将mongoose软件包更新到最新版本时,它得到解决.

I had the same error, and it got resolved when I updated the mongoose package to the latest version.

这篇关于无效的mongodb uri必须以"mongodb://"开头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 12:10
查看更多