app.module.ts
:
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService} from './app.service';
import { MongooseModule } from '@nestjs/mongoose';
@Module({
imports: [MongooseModule.forRoot('mongodb://127.0.0.1/nest')],
controllers: [AppController],
providers: [AppService]
})
export class AppModule {}
I am new to nestjs, after adding this line MongooseModule.forRoot('mongodb://127.0.0.1/nest')
, I keep getting this error. Is there anything i miss out?
Error: ERROR [ExceptionHandler] nest cant resolve dependencies of the MongooseCoreModule (MongooseConnectionName, ?) Please make sure that the argument ModuleRef at index[1] is available in the MongooseCoreModule context.
user25203962 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.