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

Error: @nestjs/graphql tried to access graphql-tools, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound. #1162

Closed
andreialecu opened this issue Sep 24, 2020 · 2 comments

Comments

@andreialecu
Copy link
Contributor

I'm submitting a...


[ ] Regression 
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

@nestjs/graphql uses graphql-tools without listing it in its dependencies. It works in certain hoisting layouts because it hijacks it from apollo-server-core

This creates issues when using the package with Yarn's PnP resolution, and I assume also breaks the pnpm package manager.

Expected behavior

All imported packages should be listed in package.json.

What is the motivation / use case for changing the behavior?

It is a good practice to list all imported packages in package.json

Environment


Nest version: 7.7.0
@andreialecu
Copy link
Contributor Author

Same issue with apollo-env:

Error: @nestjs/graphql tried to access apollo-env, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

import { mapValues } from 'apollo-env';

@kamilmysliwiec
Copy link
Member

Fixed

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

Successfully merging a pull request may close this issue.

2 participants