본문 바로가기

공부기록/Node.js

[graphql]에러 code ERESOLVEnpm ERR! ERESOLVE could not resolvenpm ERR! npm ERR! While resolving: express-graphql@0.12.0npm ERR! Found: graphql@16.6.0npm ERR! node_modules/graphqlnpm ERR! graphql@"^16.6.0" from the root project

에러상황 : graphql 를 사용하는 중, cors에러를 만나서 cors를 npm install 하려고 했는데,

위와 같은 에러가 발생. 모든 서드파티 라이브러리를 설치하려고 하면 같은 에러가 발생.

express-graphql 깃헙 계정에 들어가봤더니 해당 에러가 똑같이 발생함.

 

 

 

해결? 

깃헙 계정 이슈에 보니 많은 사람들이 나와 같은 에러를 만나고 있었고 그중 한 사람이 아래와 같은 이야기를 해서 

똑같이 따라했더니 해결 되었다. 

express-graphql은 0.12.0

express은 4.18.1

graphql은 15.8.0

으로 package.json에서 고치고 

npm install 을 하면 된다.

 

 

 

 

 

https://github.com/graphql/express-graphql/issues/449

 

Latest express-graphql is not working with the latest graphql · Issue #449 · graphql/express-graphql

Latest express-graphql isnot working with the latest graphql: npm install express-graphql@latest --save npm WARN express-graphql@0.6.12 requires a peer of graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^...

github.com