That error occurs if you have two different versions of graphql
in your entire dependency tree.
Your dependencies and dev dependencies for package.json
need to use the same version of graphql
, and all those dependencies need to have graphql
as their peer dependency, like this:
"peerDependencies": {
"graphql": "^0.11.0 || ^0.12.0 || ^0.13.0"
}
Note that in your own package.json
, you don't need the peer dependency. Here's an example of dependencies in your package.json
that fulfill the requirements I mentioned above:
"dependencies": {
"graphql-yoga": "1.4.3",
"prisma-binding": "1.5.16"
},
"devDependencies": {
"graphql-cli": "2.15.8",
"prisma": "1.3.3"
}
I copied the dependencies from here .
Update your package.json
to the above dependencies , then rm -rf node_modules yarn.lock
and npm install
or yarn
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.