您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

UnhandledPromiseRejectionWarning:MongooseServerSelectionError

UnhandledPromiseRejectionWarning:MongooseServerSelectionError

试试看,好像您正在使用MongoDB地图集

mongoose
     .connect( uri, { useNewUrlParser: true, useCreateIndex: true, useUnifiedTopology: true })
     .then(() => console.log( 'Database Connected' ))
     .catch(err => console.log( err ));

并转到MongoDB Atlas-> NetworkAccess-> Edit->并添加Current IP address它!!

mongodb 2022/1/1 18:20:43 有456人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶