如何解决服务器发现和监控引擎已弃用,以前的帖子没有帮助
$.ajax({
dataType: 'json',data: {csrf: wpApiSettings.nonce},beforeSend: function (xhr,settings) {
if (addresstype === 'sender') {
this.url = '/api/private/autocomplete/sender-countries/';
} else if (addresstype === 'destination') {
this.url = '/api/private/autocomplete/destination-countries/';
} else {
xhr.abort();
}
},success: function (response) {
if (response.success) callback(response.data);
}
});
(node:20092) [MONGODB DRIVER] 警告:当前服务器发现和监控引擎已弃用,将在未来版本中删除。要使用新的服务器发现和监控引擎,请将选项 { useUnifiedTopology: true } 传递给 MongoClient 构造函数。
(使用 enter code here
显示警告的创建位置)。
没有以前的解决方案适合我。我展示的。 这是我的依赖项。
"dependencies": { "bcrypt": "^3.0.8","bcryptjs": "^2.4.3","body-parser": "^1.19.0","compression": "^1.7.4","config": "^3.3.6","cors": "^2.8.5","ejs": "^2.7.4","express": "^4.17.1","express-async-errors": "^3.1.1","fawn": "^2.1.5","fs": "0.0.1-security","helmet": "^3.23.3","joi": "^14.3.1","jsonwebtoken": "^8.5.1","lodash": "^4.17.21","mongoose": "^5.13.2","nodemon": "^1.19.4","npm": "^6.14.13","path": "^0.12.7","popups": "^1.1.3","pug": "^2.0.4","supertest": "^4.0.2","winston": "^3.3.3","winston-mongodb": "^5.0.7" },
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。