GraphQL version issue on fresh install
See original GitHub issueJust cloned the repo and install everything using yarn run setup as according to the README.md, and configured my database on my .env file. So far so good.
When I run yarn start serve, everything works just fine, but if I try to get into the /graphql URL to start doing some GraphQL queries, I get the following error:
{ "errors": [ { "code": "500", "message": "Cannot use GraphQLSchema \"[object GraphQLSchema]\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results." } ] }
Seems like a conflict between different dependencies requiring different versions of the GraphQL package. Also got this error after re-installing again on the same project with yarn install:
warning " > express-graphql@0.6.12" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0".
Currently I’m using yarn@1.15.2 and node@10.15.3, btw.
Any info regarding this issue? Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:7

Top Related StackOverflow Question
Can you add the specific versions of packages you added to make it work? I am having issues while trying to use GraphQL too! It sends the error you mentioned, but can’t find duplicate versions of GraphQL in my
node_modulesfolder. As you said, I first solved theevent-streamandflatmap-streamby deletingyarn.lockand doing a freshyarn install, however this didn’t solved the GraphQL issue and it’s really bugging my mind. Thanks in advance!Versions in the package.json should be locked down to a specific version. I ran into the GraphQL version conflict described above and also am seeing version issues with websockets, which is a dependency of event-dispatcher.
And, ideally all packages should be upgraded to modern versions.
Lovely framework!!! I’ve just spent too much time with npm version conflicts.