Skip to content
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

don`t work without graphql #32

Closed
eduscrakozabrus opened this issue Feb 25, 2021 · 11 comments
Closed

don`t work without graphql #32

eduscrakozabrus opened this issue Feb 25, 2021 · 11 comments

Comments

@eduscrakozabrus
Copy link

internal/modules/cjs/loader.js:818
throw err;
^

Error: Cannot find module 'graphql'
Require stack:

  • /dist/node_modules/@nestjs/graphql/dist/decorators/directive.decorator.js
  • /dist/node_modules/@nestjs/graphql/dist/decorators/index.js
  • /dist/node_modules/@nestjs/graphql/dist/index.js
  • /dist/node_modules/@nestjs/graphql/index.js
  • /dist/node_modules/@ntegral/nestjs-sentry/dist/sentry.interceptor.js
  • /dist/node_modules/@ntegral/nestjs-sentry/dist/index.js
  • /dist/main.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object. (/dist/node_modules/@nestjs/graphql/dist/decorators/directive.decorator.js:4:19)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object. (/dist/node_modules/@nestjs/graphql/dist/decorators/index.js:7:22)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/dist/node_modules/@nestjs/graphql/dist/decorators/directive.decorator.js',
    '/dist/node_modules/@nestjs/graphql/dist/decorators/index.js',
    '/dist/node_modules/@nestjs/graphql/dist/index.js',
    '/dist/node_modules/@nestjs/graphql/index.js',
    '/dist/node_modules/@ntegral/nestjs-sentry/dist/sentry.interceptor.js',
    '/dist/node_modules/@ntegral/nestjs-sentry/dist/index.js',
    '/dist/main.js'
    ]
@wodka
Copy link

wodka commented Mar 8, 2021

this is not related to this library - you have not yet setup graphql: https://docs.nestjs.com/graphql/quick-start#installation

@ntegral
Copy link
Owner

ntegral commented Mar 15, 2021

GraphQL is only required if you want to use the GraphQlInterceptor. Please use the latest released version

@ntegral ntegral closed this as completed Mar 15, 2021
@jTanG0506
Copy link

Also getting this issue whilst using "@ntegral/nestjs-sentry": "^2.0.6"

@jannomeister
Copy link

I'm also experiencing it. I'm using the latest version

@jtag05
Copy link

jtag05 commented Mar 21, 2021

@ntegral this is an issue, so please reopen. Every one of my services started complaining about needing graphql after upgrading to 2.0.6. Looking at the /dist/index.js you are exporting the GraphQlInterceptor directly from there which I would imagine is causing the entire package to rely on graphql existing.

@Gbuomprisco
Copy link

Gbuomprisco commented Mar 21, 2021

Agree with @jtag05 - that's likely to be the issue

I reverted to 1.0.4, every other version wanted me to import GraphQL which is a ton of deps

@ntegral what do you think about removing the interceptor from the main barrel?

@jtag05
Copy link

jtag05 commented Mar 21, 2021

@Gbuomprisco oddly enough, a strict requirement on 2.0.5 will complain about the graphql requirements during build time, but at runtime it still functions. 2.0.6 is completely borked though.

@polyakova
Copy link

I have the same issue. Do you have a solution for it?

@GrabbenD
Copy link

Same issue here even though we don't use Graphql anywhere in our codebase

@wdospinal
Copy link

Do we have updates on this? same problem with version "@ntegral/nestjs-sentry": "^2.0.6"

@martinsotirov
Copy link

Same problem but weirdly enough on 2.0.5. I haven't tried 2.0.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests