npm 모듈 간 충돌 일어났을 때 해결법

sangeun jo·2021년 10월 6일
0

npm install react-native-vlc-player명령어를 통해 react-native-vlc-player를 설치하던 중 다음과 같은 에러를 만났다.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: my_first_project@0.0.1
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR! react@"17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.1" from react-native-vlc-player@0.2.3
npm ERR! node_modules/react-native-vlc-player
npm ERR! react-native-vlc-player@"0.2.3" 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 C:\Users\cler3\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\cler3\AppData\Local\npm-cache_logs\2021-06-07T12_14_02_971Z-debug.log

명령어 사이에 --legacy-peer-deps 옵션을 주었더니 해결 되었다.

npm install --legacy-peer-deps react-native-vlc-player
profile
코더가 아니라 개발자가 되자

0개의 댓글