Gatsby 프로젝트를 다운로드 받아서, npm install을 할 때 다음과 같은 에러가 발생하며, 제대로 설치가 되질 않았다.

 

아오 빨간색 에러는 보기만해도... 무섭다... 에러야... 꺼져주겠니?

 

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: gatsby-starter-hello-world@0.1.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.0.0" from google-map-react@2.1.9
npm ERR! node_modules/google-map-react
npm ERR!   google-map-react@"^2.1.9" 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.
npm ERR! 
npm ERR! See /Users/jangseongho/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jangseongho/.npm/_logs/2021-06-08T05_27_26_143Z-debug.log

 도대체 무슨 에러인지 몰라서, 검색을 해봤다. 생각보다 빠르게 해답을 찾을 수 있었다.

 

https://stackoverflow.com/questions/64573177/unable-to-resolve-dependency-tree-error-when-installing-npm-packages

 

Unable to resolve dependency tree error when installing npm packages

When trying to install the npm packages using npm i command I am getting the following exception: I have tried reinstalling the node js package and setting proxy to off using: set HTTP_PROXY= set

stackoverflow.com

 

npm install --legacy-peer-deps

 

아...내가 낸 에러는 스트레스 덜 받는데...환경 세팅이나, 설치 도중 발생하는 이런 시스템 충돌 에러는 정말 싫다.

 

다행히도 빠르게 해결할 수 있었다.

 

 

Posted by sungho88
,