graphql / express-graphql

Create a GraphQL HTTP server with Express.
MIT License
6.34k stars 538 forks source link

Peer dependency error on new installation of graphql #805

Closed ThePiyushAggarwal closed 1 year ago

ThePiyushAggarwal commented 2 years ago

I am getting this:

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: graphql-first@1.0.0
npm WARN Found: graphql@15.8.0
npm WARN node_modules/graphql
npm WARN   peer graphql@"^14.7.0 || ^15.3.0" from express-graphql@0.12.0npm WARN   node_modules/express-graphql
npm WARN     express-graphql@"^0.12.0" from the root project
npm WARN   1 more (the root project)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer graphql@"^14.7.0 || ^15.3.0" from express-graphql@0.12.0  
npm WARN node_modules/express-graphql
npm WARN   express-graphql@"^0.12.0" from the root project
dk-raw commented 2 years ago

There are people having the same issue since 2018! This is unacceptable!

1catchman commented 2 years ago

Same issue, I had to install it with --force flag and got a lot of errors during the development.

adam-nielsen commented 2 years ago

As a temporary workaround you can run npm install with the --legacy-peer-deps option.

Looks like the same issue as #790.

hamidjavadi commented 2 years ago

Please upgrade GraphQL package to latest version => 16.5.0 Thanks

BlueSialia commented 2 years ago

For those interested, I forked the project at https://github.com/BlueSialia/express-graphql.

The company I work at uses it for a project, so I will be maintaining it for a long while.

Be aware that I made some changes already to the library, so just replacing express-graphql with @bluesialia/express-graphql may not be enough in some cases.

newbeb commented 1 year ago

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

amerikan commented 1 year ago

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.

saihaj commented 1 year ago

this project is deprecated and we recommend to moving to alternatives. You can read more here https://github.com/graphql/express-graphql#this-library-is-deprecated