-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
ERROR [ExceptionHandler] Nest cannot export a provider/module that is not a part of the currently processed module (TypegooseCoreModule). Please verify whether the exported DbConnectionToken is available in this particular context.
Possible Solutions:
- Is DbConnectionToken part of the relevant providers/imports within TypegooseCoreModule?
app.module.ts: import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { TypegooseModule } from 'nestjs-typegoose';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { AuthModule } from './modules/authentication/AuthModule';
import configuration from './config/configuration';
import { UserModule } from './modules/user/user.module';
import { TypegooseCoreModule } from './typegoose-core/typegoose-core.module';
import { MongooseModule } from '@nestjs/mongoose';
@module({
imports: [
ConfigModule.forRoot({
isGlobal: true,
load: [configuration],
}),
UserModule,
TypegooseModule.forRoot("mongodb://localhost:27017/dbname", {
useNewUrlParser: true,
}),
],
controllers: [AppController],
providers: [AppService], // Remove ConfigModule from providers
})
export class AppModule {}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels