我正在编写一个NodeJS/express API,在连接到mongo服务器时面临以下警告:
Warning: no saslprep library specified. Passwords will not be sanitized
在文档或github/google中未发现此警告——是操作系统(linux)库丢失,还是 node 包丢失?
这是连接代码示例:
const client = await MongoClient.connect(`mongodb://${auth[0]}:${auth[1]}@${url}/admin`, {
useNewUrlParser: true
});
this.db = client.db(database);
我怎样才能摆脱它?
Additional information:
Mongodb服务器:docker mongo:最新版本,目前已解析为4.0.4
mongodb库:3.1.9