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

Support Node 15 #464

Closed
n-romaniv opened this issue Feb 15, 2021 · 4 comments
Closed

Support Node 15 #464

n-romaniv opened this issue Feb 15, 2021 · 4 comments

Comments

@n-romaniv
Copy link

Hi! We are using Node 15 to run our development instances with plans to move over to Node 16 once it's out. However, it appears @apollo/gateway and @apollo/federation are incompatible with Node 15.0 and later. Is there any specific reason Node 15 is not supported? If a PR is needed, I might find some time to contribute.

@delucca
Copy link

delucca commented Feb 20, 2021

+1 here.

In my scenario, I'm using @nestjs/graphql, which user @apollo/gateway under the hood, and it can't solve the peer deps, since @apollo/gateway uses apollo-graphql that does not support GraphQL 15, but most of the GraphQL packages (many other that I have) are using GraphQL 15, causing a peer dependency conflict.

Here is the install log:

business/pocs/cqrs-es on  pocs/cqrs-es [$✘!?] via ⬢ v15.9.0 took 2s
❯ npm i graphql
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: [email protected]
npm ERR! node_modules/graphql
npm ERR!   graphql@"^15.4.0" from the root project
npm ERR!   peer graphql@"^14.1.1 || ^15.0.0" from @nestjs/[email protected]
npm ERR!   node_modules/@nestjs/graphql
npm ERR!     @nestjs/graphql@"^7.9.9" from the root project
npm ERR!   9 more (apollo-server-fastify, graphql-tools, @apollo/gateway, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer graphql@"^14.2.1" from [email protected]
npm ERR! node_modules/@apollo/gateway/node_modules/apollo-graphql
npm ERR!   apollo-graphql@"^0.4.0" from @apollo/[email protected]
npm ERR!   node_modules/@apollo/gateway
npm ERR!     optional @apollo/gateway@"^0.17.0" from @nestjs/[email protected]
npm ERR!     node_modules/@nestjs/graphql
npm ERR!       @nestjs/graphql@"^7.9.9" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/delucca/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/delucca/.npm/_logs/2021-02-20T16_36_36_308Z-debug.log

@glasser
Copy link
Member

glasser commented Feb 23, 2021

I think these are two separate questions that just both happen to relate to the number 15?

@n-romaniv My understanding is that it's our practice to mark our npm packages with engines.node values that don't include the current unstable version of Node. (Is that correct, @abernix?) That doesn't mean that these packages actually don't work on Node 15; it's just that we haven't tested it there yet. If you find actual incompatibilities with Node 15 it would be worth knowing about them!

@delucca You're talking about GraphQL 15, not Node 15. Older versions of apollo-graphql didn't accept graphql@15 as a peer dep but that was fixed in [email protected], which has been required by @apollo/gateway since I believe 0.18.0. So I believe your issue is that @nestjs/graphql should update to a more recent version of @apollo/gateway.

I don't think either of these call for immediate changes to this project so I'll close this issue.

@n-romaniv
Copy link
Author

@glasser, got it. Thanks for the clarification. We are using your lib with Node 15, so have not encountered any incompatibilities yet. I was only wondering if there is a reason for the version specified in engines.node other than lack of testing/support.

@abernix
Copy link
Member

abernix commented May 3, 2021

As of the landing of #713, we're now testing Node.js 16 and since those tests are passing, the latest versions of the @apollo/gateway (0.28.0) and @apollo/federation (0.24.0) packages have just been published with Node.js 16 in their supported engines range for node.

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