当我连接到mongo atlas时,会出现这个错误,但当我使用本地数据库时,它工作得很好。查看数据库连接图像和终端错误以了解更多信息。wtimeout, j, and fsync is deprecated.Use writeConcern instead..` to show where the warning was created)
Top-level use of w, wtimeout, j, and fsync</
我正在学习一个教程,学习如何使用异步函数通过mongoose正确地连接到mongodb。应该很简单,但2天后就弄不明白了。它将连接我,但它首先给我错误,即使我相信我解释了这些错误?created) (node:95496) [MONGODB DRIVER] Warning: Top-level use of w,wtimeout, j, and fsync is
deprecated.Use writeConc
useUnifiedTopology: true,});MongoTimeoutError: Server selection timed out after 30000 msmongoose.connect(`mongodbhaInterval,replicaSet,secondaryAcceptable