javascript 蒙戈分析错误:URI格式不正确,无法在parseConnectionString中解析

but5z9lq  于 2022-11-27  发布在  Java
关注(0)|答案(1)|浏览(121)

我在运行Discord bot时遇到了这个错误。服务器上的日志显示了这个错误:

0|bot      | MongoParseError: URI malformed, cannot be parsed
0|bot      |     at parseConnectionString (/home/xxxxxx/bot/node_modules/discord.js-leveling/node_modules/mongodb/lib/core/uri_parser.js:580:21)
0|bot      |     at QueryReqWrap.callback (/home/xxxxxx/bot/node_modules/discord.js-leveling/node_modules/mongodb/lib/core/uri_parser.js:127:7)
0|bot      |     at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/callback_resolver:49:10)

当我在VS代码中运行它时,它很好,没有任何问题。
我已经尝试重新安装依赖项,甚至重新上传文件。

goucqfw6

goucqfw61#

当使用Levels.setURL()时,参数应该是undefined。可能是config.json文件或.env文件在托管服务器上没有正确填充的问题?

相关问题