express-graphql
express-graphql copied to clipboard
Cannot install with graphql 16.0.1
I get the follow error from npm when attempting to install along side graphql 16.0.1
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/graphql
npm ERR! graphql@"^16.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer graphql@"^14.7.0 || ^15.3.0" from [email protected]
npm ERR! node_modules/express-graphql
npm ERR! express-graphql@"*" 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/fred/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/fred/.npm/_logs/2021-11-23T13_30_12_157Z-debug.log
Has anyone figured out a working solution to this?
Not an ideal solution, but I ended up having to install an older version of graphql to get this working.
I did also. I'm just wondering since no one is responding if this project will go stale
I did also. I'm just wondering since no one is responding if this project will go stale
I created an issue as well. Would be bad if this becomes stale. Such a good project...
I did the same but haven't heard anything. What stinks is that every tutorial uses express-graphql and to this day there is no response.
Mind that PR #793 should fix the peer dependency, among other things.
I couldn't wait anymore, so I fork the project: https://github.com/GeorgesTech/express-graphql Changes: https://github.com/GeorgesTech/express-graphql/pull/1 And I used it like this:
{
"express-graphql": "https://gitpkg.now.sh/GeorgesTech/express-graphql/npmDist?chore/graphql-16",
}
gitpkg.now.sh
allow me to target npmDist folder during install
I do not plan to maintain the fork for a long time I hope the issue will resolve soon
In the meantime, renovate/dependabot is happy
FYI, Looks like they are deprecating express-graphql in favor of graphql-http: https://github.com/graphql/express-graphql/pull/816.
This library is deprecated and it so recommended to migrate to alternatives https://github.com/graphql/express-graphql/pull/817
From the various graphql servers alternatives, in our experience the easiest one to migrate over to, almost a drop in replacement, was GraphQL Yoga with their Express integration.