반응형

Node.js command prompt에서 npm install을 사용하여 vuetify를 설치하려고 했더니, Fix the upstream dependency conflict, or retry 에러가 발생했다. 아래의 에러를 해석하면 맞지 않은 의존성에 문제가 있어 에러가 발생한 것으로 확인 되는데, 친절하게도 해결하는 방법에 대해서도 기재를 해줬다.

 

문제 로그

C:\tt\test>npm i vuetify
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: test@1.0.0
npm ERR! Found: vue@2.7.14
npm ERR! node_modules/vue
npm ERR!   vue@"^2.5.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^3.2.0" from vuetify@3.3.22
npm ERR! node_modules/vuetify
npm ERR!   vuetify@"*" from the root project
npm ERR!   peer vuetify@"^3.0.0-beta.4" from vite-plugin-vuetify@1.0.2
npm ERR!   node_modules/vite-plugin-vuetify
npm ERR!     peerOptional vite-plugin-vuetify@"^1.0.0-alpha.12" from vuetify@3.3.22
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!
npm ERR! For a full report see:
npm ERR! C:\Users\ttee\AppData\Local\npm-cache\_logs\2023-10-18T06_46_33_219Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: C:\Users\ttee\AppData\Local\npm-cache\_logs\2023-10-18T06_46_33_219Z-debug-0.log

 

위의 에러 로그에서 밑에서 9번째 줄을 보면 --force 또는 --legacy-peer-deps 명령어를 추가해서 재시도를 해보라고 나와 있다.

Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps 
to accept an incorrect (and potentially broken) dependency resolution.

 

문제 해결 방법

아래와 같이, --legacy-peer-deps를 추가하여 다시 npm install을 통해 vuetify를 설치하면 된다.

npm install --legacy-peer-deps vuetify

 

위와 같이 npm audit fix가 나올 수 있다. 이 경우는 기존에 이미 설치가 되어 있는게 있는 경우에도 발생을 한다. 위의 메시지가 보기 싫으면 삭제를 하고 다시 설치를 하는 것도 하나의 방법이다.

반응형
  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기