Closed adikaladik closed 4 years ago
Have you tried requiring winston-mongodb
in your module, and than simply passing new winston.transports.MongoDB
to the transports array?
For example:
import { Module } from '@nestjs/common';
import { WinstonModule } from 'nest-winston';
import * as winston from 'winston';
require('winston-mongodb');
@Module({
imports: [
WinstonModule.forRoot({
transports: [
new winston.transports.MongoDB(options),
],
// other options
}),
],
})
export class AppModule {}
Yes, tried. Property 'MongoDb' does not exist on type 'Transports'.
Can you please provide a minimal repository/example? I'm trying to understand if this is something related to winston-mognodb
or this library.
Because the error is:
Property 'MongoDb' does not exist on type 'Transports'
I think this is something wrong with winston-mongodb
typings.
Closing, feel free to comment further if you need any help, or share your solution (if you have one).
@adikaladik dis you find the solution?
Hi! Can someone please advise how can I use this lib with nest-winston? https://github.com/winstonjs/winston-mongodb