개발괴발/Vue.js

[Vue.js] npm install 오류 (ERESOLVE unable to resolve dependency tree)

YUUUN! 2021. 7. 8. 16:34

예제 프로젝트 소스를 클론받아 프로젝트 셋업하려고 npm install 명령 실행했더니 오류 발생

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree

예제 프로젝트에서는 webpack 4.36.0 또는 5.0.0 버전이 필요한데 내가 설치한 버전은 5.43.0 이었다.

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.

오류 메세지에서 알려준대로  --save --legacy-peer-deps  를 추가하여 다시 명령 실행했더니 오류없이 설치되었다.