Closed DevHusariaSolutions closed 1 year ago
I've created new DB. I'm able to connect to it via Mongo Compass. I'm unable using this package specyfing only uri as:
MongooseModule.forRoot(DATABASE_URL)
getting error ERROR [MongooseModule] Unable to connect to the database. Retrying
ERROR [MongooseModule] Unable to connect to the database. Retrying
but if I remove dbName after slash from DATABASE_URL and use code below
MongooseModule.forRoot(DATABASE_URL, { dbName: 'my-db-name' })
It works
Wasted more hours than I could, so minimal info
-
No response
it connects correctly for uri with dbname
10.0.1
7.6.1
10.2.7
18.18
Please, use our Discord channel (support) for such questions. We are using GitHub to track bugs, feature requests, and potential improvements.
Is there an existing issue for this?
Current behavior
I've created new DB. I'm able to connect to it via Mongo Compass. I'm unable using this package specyfing only uri as:
getting error
ERROR [MongooseModule] Unable to connect to the database. Retrying
but if I remove dbName after slash from DATABASE_URL and use code below
It works
Wasted more hours than I could, so minimal info
Minimum reproduction code
-
Steps to reproduce
No response
Expected behavior
it connects correctly for uri with dbname
Package version
10.0.1
mongoose version
7.6.1
NestJS version
10.2.7
Node.js version
18.18
In which operating systems have you tested?
Other
No response