您好,我整整两天都在试图解决这个错误,谷歌搜索,阅读这里的相关论坛,但似乎我无法解决这个错误以使我的代码完全发挥作用。我将不胜感激任何帮助
\n第一位代表错误的描述,后面的位是代码。再次预先感谢您。
\n[nodemon] restarting due to changes...\n[nodemon] starting `node app.js`\nC:\\Users\\\xeb\xa5\x98 \xea\xb4\x91\xec\x84\xad\\Desktop\\00-starting-project\\node_modules\\mongodb\\lib\\sdam\\topology.js:291\n const timeoutError = new error_1.MongoServerSelectionError(`Server selection timed out after ${serverSelectionTimeoutMS} ms`, this.description);\n ^\n\nMongoServerSelectionError: connect ECONNREFUSED ::1:27017\n at Timeout._onTimeout (C:\\Users\\\xeb\xa5\x98 \xea\xb4\x91\xec\x84\xad\\Desktop\\00-starting-project\\node_modules\\mongodb\\lib\\sdam\\topology.js:291:38)\n at listOnTimeout (node:internal/timers:564:17)\n at process.processTimers (node:internal/timers:507:7) {\n reason: TopologyDescription {\n type: 'Unknown',\n servers: Map(1) {\n 'localhost:27017' => ServerDescription {\n address: 'localhost:27017',\n type: 'Unknown',\n hosts: [],\n passives: [],\n arbiters: [],\n tags: {},\n minWireVersion: 0,\n maxWireVersion: 0,\n roundTripTime: -1,\n lastUpdateTime: 50395518,\n lastWriteDate: 0,\n error: MongoNetworkError: connect ECONNREFUSED ::1:27017\n at …Run Code Online (Sandbox Code Playgroud)