Skip to content

Issue: ERROR [MongooseModule] Unable to connect to the database, getting backend to start #22

@mykelbengineer

Description

@mykelbengineer

When I start the backend by

cd backend

npm run start:dev

I get the following output

[Nest] 15698  - 09/09/2023, 10:13:24 PM     LOG [NestFactory] Starting Nest application...
[Nest] 15698  - 09/09/2023, 10:13:24 PM   ERROR [MongooseModule] Unable to connect to the database. Retrying (1)...
[Nest] 15698  - 09/09/2023, 10:13:24 PM     LOG [InstanceLoader] MongooseModule dependencies initialized +1ms
[Nest] 15698  - 09/09/2023, 10:13:24 PM     LOG [InstanceLoader] PassportModule dependencies initialized +0ms
[Nest] 15698  - 09/09/2023, 10:13:24 PM     LOG [InstanceLoader] ConfigHostModule dependencies initialized +0ms
[Nest] 15698  - 09/09/2023, 10:13:24 PM     LOG [InstanceLoader] AppModule dependencies initialized +0ms
[Nest] 15698  - 09/09/2023, 10:13:24 PM     LOG [InstanceLoader] ConfigModule dependencies initialized +0ms
[Nest] 15698  - 09/09/2023, 10:13:24 PM     LOG [InstanceLoader] JwtModule dependencies initialized +0ms
[Nest] 15698  - 09/09/2023, 10:13:27 PM   ERROR [MongooseModule] Unable to connect to the database. Retrying (2)...
[Nest] 15698  - 09/09/2023, 10:13:30 PM   ERROR [MongooseModule] Unable to connect to the database. Retrying (3)...
[Nest] 15698  - 09/09/2023, 10:13:33 PM   ERROR [MongooseModule] Unable to connect to the database. Retrying (4)...
[Nest] 15698  - 09/09/2023, 10:13:36 PM   ERROR [MongooseModule] Unable to connect to the database. Retrying (5)...
[Nest] 15698  - 09/09/2023, 10:13:39 PM   ERROR [MongooseModule] Unable to connect to the database. Retrying (6)...
[Nest] 15698  - 09/09/2023, 10:13:42 PM   ERROR [MongooseModule] Unable to connect to the database. Retrying (7)...
[Nest] 15698  - 09/09/2023, 10:13:45 PM   ERROR [MongooseModule] Unable to connect to the database. Retrying (8)...
[Nest] 15698  - 09/09/2023, 10:13:48 PM   ERROR [MongooseModule] Unable to connect to the database. Retrying (9)...
[Nest] 15698  - 09/09/2023, 10:13:48 PM   ERROR [ExceptionHandler] The `uri` parameter to `openUri()` must be a string, got "undefined". Make sure the first parameter to `mongoose.connect()` or `mongoose.createConnection()` is a string.
MongooseError: The `uri` parameter to `openUri()` must be a string, got "undefined". Make sure the first parameter to `mongoose.connect()` or `mongoose.createConnection()` is a string.

Am I missing a node module or didn't follow an instruction?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions