apollographql / graphql-subscriptions

:newspaper: A small module that implements GraphQL subscriptions for Node.js
MIT License
1.58k stars 133 forks source link

Cannot Install on Node 16 NPM 8 #246

Open ais-one opened 2 years ago

ais-one commented 2 years ago

Reproduce using these commands

npm ini -y
npm install graphql
npm install graphql-ws
npm install graphql-subscriptions

The last command has these errors

PS C:\Users\aaron\test\xxx> npm i graphql-subscriptions
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: xxx@1.0.0
npm ERR! Found: graphql@16.0.0
npm ERR! node_modules/graphql
npm ERR!   graphql@"^16.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer graphql@"^0.10.5 || ^0.11.3 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from graphql-subscriptions@1.2.1
npm ERR! node_modules/graphql-subscriptions
npm ERR!   graphql-subscriptions@"*" 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.
bneigher commented 2 years ago

suggestion: change title to "Need to upgrade peerDependency of graphql to include 16"