Git Product home page Git Product logo

Comments (17)

stiboost avatar stiboost commented on July 30, 2024 5

Looks like the library is exporting everything in the index.ts file, therefore the import statements in the graphql.interceptor gets evaulated.

from nestjs-sentry.

ntegral avatar ntegral commented on July 30, 2024 3

I'll take a look at this. Thanks

from nestjs-sentry.

jeremyhalin avatar jeremyhalin commented on July 30, 2024 1

I failed to get this package to work out of the box, so I now use nest-raven.
Works like a charm.

from nestjs-sentry.

nicobytes avatar nicobytes commented on July 30, 2024

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

from nestjs-sentry.

ntegral avatar ntegral commented on July 30, 2024

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.

from nestjs-sentry.

ntegral avatar ntegral commented on July 30, 2024

@module({
imports: [
ConfigModule.forRoot(),
SentryModule.forRootAsync({
imports: [ConfigModule],
useFactory: async (cfg:ConfigService) => ({
dsn: cfg.get('SENTRY_DSN'),
debug: true,
environment: 'dev',
release: null, // must create a release in sentry.io dashboard
logLevel: LogLevel.Debug //based on sentry.io loglevel //
}),
inject: [ConfigService],
}),
],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}

from nestjs-sentry.

adamtester avatar adamtester commented on July 30, 2024

Hello! Ran npm install and my integration stopped working

FAIL test/e2e/legacy/verify.e2e-spec.ts
  ● Test suite failed to run
    Cannot find module '@nestjs/graphql' from '../../node_modules/@ntegral/nestjs-sentry/dist/graphql.interceptor.js'
    Require stack:
      /home/runner/work/.../node_modules/@ntegral/nestjs-sentry/dist/graphql.interceptor.js
      /home/runner/work/.../node_modules/@ntegral/nestjs-sentry/dist/index.js
      /home/runner/work/../src/app.module.ts
      legacy/verify.e2e-spec.ts
      at Resolver.resolveModule (../../node_modules/jest-resolve/build/index.js:306:11)
      at Object.<anonymous> (../../../../../../../graphql.interceptor.ts:12:3)
  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,
  ],

from nestjs-sentry.

adamtester avatar adamtester commented on July 30, 2024

Looks like this is an issue with npm 7
image

from nestjs-sentry.

ntegral avatar ntegral commented on July 30, 2024

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?

https://github.com/ntegral/nestjs-sentry-example

from nestjs-sentry.

ntegral avatar ntegral commented on July 30, 2024

@adamtester
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?

https://github.com/ntegral/nestjs-sentry-example

from nestjs-sentry.

adamtester avatar adamtester commented on July 30, 2024

@ntegral yep I'll give it a go tomorrow and report back!

from nestjs-sentry.

vladi-strilets avatar vladi-strilets commented on July 30, 2024

@ntegral
Hi, I have the same issue.
I have cloned your example repo, just git clone, yarn, yarn start and.. Error: Cannot find module 'graphql'

node v12.21.0
yarn 1.22.10
OS: Ubuntu 20.04

from nestjs-sentry.

cerireyhan avatar cerireyhan commented on July 30, 2024

Could we at least re-open the issue? It's reproducible.

from nestjs-sentry.

ntegral avatar ntegral commented on July 30, 2024

Please update to the latest version of the module 2.0.7 @cerireyhan @vladi-strilets @adamtester

from nestjs-sentry.

ntegral avatar ntegral commented on July 30, 2024

If you are using the GraphQLInterceptor, you will have to install graphQL

from nestjs-sentry.

vladi-strilets avatar vladi-strilets commented on July 30, 2024

@ntegral I can confirm that after update to 2.0.07 it works

from nestjs-sentry.

ntegral avatar ntegral commented on July 30, 2024

@vladi-strilets Thanks for letting me know. With that confirmation, I'll go ahead and close this issue.

from nestjs-sentry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.