express-graphql icon indicating copy to clipboard operation
express-graphql copied to clipboard

Cannot install with graphql 16.0.1

Open fredevery opened this issue 3 years ago • 7 comments

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

fredevery avatar Nov 23 '21 13:11 fredevery

Has anyone figured out a working solution to this?

adviner avatar Nov 30 '21 18:11 adviner

Not an ideal solution, but I ended up having to install an older version of graphql to get this working.

fredevery avatar Dec 02 '21 20:12 fredevery

I did also. I'm just wondering since no one is responding if this project will go stale

adviner avatar Dec 07 '21 11:12 adviner

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...

st33fn avatar Dec 23 '21 19:12 st33fn

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.

adviner avatar Jan 01 '22 20:01 adviner

Mind that PR #793 should fix the peer dependency, among other things.

jnv avatar Jan 11 '22 10:01 jnv

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

romainPrignon avatar Jan 18 '22 09:01 romainPrignon

FYI, Looks like they are deprecating express-graphql in favor of graphql-http: https://github.com/graphql/express-graphql/pull/816.

newbeb avatar Nov 07 '22 13:11 newbeb

This library is deprecated and it so recommended to migrate to alternatives https://github.com/graphql/express-graphql/pull/817

saihaj avatar Nov 12 '22 02:11 saihaj

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.

amerikan avatar Dec 19 '22 20:12 amerikan