You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting the protocol of database-mongo plugin, it would report error that says mongodb+srv URI cannot have port number.
Steps to reproduce
touch koishi.config.yml
add database-mongo section with protocol set to mongodb+srv
install all the stuff
koishi start
ERROR!
Expected behavior
Obviously be able to use the plugin normally.
Screenshots
[W] app MongoParseError: mongodb+srv URI cannot have port number
at new ConnectionString (/app/node_modules/mongodb-connection-string-url/lib/index.js:146:23)
at parseOptions (/app/node_modules/mongodb/lib/connection_string.js:213:17)
at new MongoClient (/app/node_modules/mongodb/lib/mongo_client.js:62:63)
at Function.connect (/app/node_modules/mongodb/lib/mongo_client.js:184:33)
at MongoDriver.start (/app/node_modules/@cosmotype/driver-mongo/lib/index.js:30:51)
at /app/node_modules/@koishijs/plugin-database-mongo/lib/index.js:45:32
at App.start (/app/node_modules/@koishijs/core/lib/node.js:2624:25)
at import_core6.App.start (/app/node_modules/koishi/lib/index.js:408:16)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Versions
OS: Ubuntu 20.04
Platform: Any
Node version: 16.18.0
Koishi version: 4.5.2
database-mongo version: 3.1.2
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
When setting the protocol of
database-mongo
plugin, it would report error that saysmongodb+srv
URI cannot have port number.Steps to reproduce
database-mongo
section with protocol set tomongodb+srv
koishi start
Expected behavior
Obviously be able to use the plugin normally.
Screenshots
Versions
database-mongo
version: 3.1.2Additional context
No response
The text was updated successfully, but these errors were encountered: