-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Cannot find module 'graphql' (is graphql mandatory?) #38
Comments
Looks like the library is exporting everything in the |
I'll take a look at this. Thanks |
I have the same issue just use the SentryInterceptor, like that app.useGlobalInterceptors(new SentryInterceptor()); and my module: SentryModule.forRootAsync({
imports: [ConfigModule],
useFactory: async (configService: ConfigType<typeof config>) => {
return {
dsn: configService.sentryKey,
debug: true,
environment: configService.env,
enabled: configService.env === 'production',
logLevel: LogLevel.Debug,
};
},
inject: [config.KEY],
}), but show error because don't have @nestjs/graphql, I'm working w/ @ntegral/nestjs-sentry 2.0.6 |
I failed to get this package to work out of the box, so I now use nest-raven. |
graphql is not a required module for this version of the npm package when using the SentryInterceptor?? I can not replicate your issue?? see the link to the sample application using the package. |
@module({ |
Hello! Ran
imports: [
ConfigModule.forRoot({ cache: true }),
SentryModule.forRootAsync({
imports: [ConfigModule],
useFactory: async (configService: ConfigService) => ({
dsn: configService.get('SENTRY_URL'),
environment: configService.get('ENVIRONMENT'),
}),
inject: [ConfigService],
}),
TokenModule,
], |
I've tested the module using npm 7.11.2. I have not gotten the error or been able to replicate it? Would you clone the sample nest application to see if you are able to replicate this error? |
@adamtester |
@ntegral yep I'll give it a go tomorrow and report back! |
@ntegral node v12.21.0 |
Could we at least re-open the issue? It's reproducible. |
Please update to the latest version of the module 2.0.7 @cerireyhan @vladi-strilets @adamtester |
If you are using the GraphQLInterceptor, you will have to install graphQL |
@ntegral I can confirm that after update to 2.0.07 it works |
@vladi-strilets Thanks for letting me know. With that confirmation, I'll go ahead and close this issue. |
I installed
nestjs-sentry
package, but it seems thatgraphql
is a mandatory package to have as a dependency.I've seen in the README something about Interceptors but I'm not sure if I understood it.
app.module.ts
logs
package.json
The text was updated successfully, but these errors were encountered: