我正在尝试安装express-graphql,但是获得了这个error.Please帮助
npm install --save express-graphql
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: rest-api@1.0.0
npm ERR! Found: graphql@16.2.0
npm ERR! node_modules/graphql
npm ERR! graphql@"^16.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer graphql@"^14.7.0 || ^15.3.0" from express-graphql@0.12.0
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.发布于 2022-03-30 16:37:42
然后删除完全初始化的项目
npm init -ynpm install express express-graphqlnpm install graphql试着在graphql开始工作之前安装express-graphql
发布于 2022-03-10 09:50:34
这些步骤解决了我的问题。
发布于 2022-08-30 12:03:57
卸载图形‘s模块,如果它是存在的。然后用一个命令安装这两个命令:
npm install graphql express-graphqlhttps://stackoverflow.com/questions/70574880
复制相似问题