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

Upgrading to 1.1.x causes a crash at runtime #7

Open
tristan957 opened this issue Mar 29, 2020 · 6 comments
Open

Upgrading to 1.1.x causes a crash at runtime #7

tristan957 opened this issue Mar 29, 2020 · 6 comments

Comments

@tristan957
Copy link

Error: Cannot find module '@nestjs/graphql'
Require stack:
- /home/tristan957/Projects/myma-store/server/node_modules/@nestjsplus/cookies/dist/interceptors/clear-cookies.interceptor.js
- /home/tristan957/Projects/myma-store/server/node_modules/@nestjsplus/cookies/dist/decorators/clear-cookies.decorator.js
- /home/tristan957/Projects/myma-store/server/node_modules/@nestjsplus/cookies/dist/decorators/index.js
- /home/tristan957/Projects/myma-store/server/node_modules/@nestjsplus/cookies/dist/index.js
- /home/tristan957/Projects/myma-store/server/node_modules/@nestjsplus/cookies/index.js
- /home/tristan957/Projects/myma-store/server/src/authentication/authentication.controller.ts
- /home/tristan957/Projects/myma-store/server/src/authentication/authentication.module.ts
- /home/tristan957/Projects/myma-store/server/src/app.module.ts
- /home/tristan957/Projects/myma-store/server/src/index.ts
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
    at Function.Module._load (internal/modules/cjs/loader.js:864:27)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/home/tristan957/Projects/myma-store/server/node_modules/@nestjsplus/cookies/dist/interceptors/clear-cookies.interceptor.js:11:19)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)

Looks like the dependency on the graphql package somehow bubbled up even when I am not using graphql in my project. I checked the package.json but I didn't see why this would happen.

@rogyvoje
Copy link

rogyvoje commented Mar 30, 2020

Got the same error, I'm not using @nestjs/graphql

@johnbiundo
Copy link
Collaborator

johnbiundo commented Mar 30, 2020

Sorry guys. Unintended side effect. Have to think about how to solve this so the package works in both GraphQl and non-GraphQL contexts.

Short term work around would be to go back to 1.1.0 (only diff is that version doesn't support GraphQL), or install @nestjs/graphql. 😢 Sorry for not having a better answer right now.

@igor-radivojevic-ct @tristan957

@tristan957
Copy link
Author

@johnbiundo I believe a way around this would be to dynamically load the graphql package using a similar technique which is discussed at nestjs/terminus#593 (comment). If you follow the line of code linked, maybe that could provide you with an idea. Thanks for your work.

@johnbiundo
Copy link
Collaborator

@tristan957 thanks for the pointer. I need to come back and spend some time on this, which will have to wait a bit due to some other current work. Thanks for your support.

@tristan957
Copy link
Author

No problem.

@eladshamai
Copy link

Should we rollback latest to 1.1.0?
Does 1.1.1 version includes any critical bug fix?

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

4 participants