-
npm install 시 npm ERR! code ERESOLVE unable to resolve dependency tree 오류가 발생한다면Frontend/React·React Native 2022. 2. 13. 00:36반응형
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: react-native-navigation@7.25.3
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR! dev react@"17.0.2" from the root project
npm ERR! peer react@">=16.0.0" from @testing-library/react-native@7.2.0
npm ERR! node_modules/@testing-library/react-native
npm ERR! dev @testing-library/react-native@"^7.2.0" from the root project
npm ERR! 1 more (react-native)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.13.1" from react-test-renderer@16.13.1
npm ERR! node_modules/react-test-renderer
npm ERR! dev react-test-renderer@"16.13.1" from the root project
npm ERR! peer react-test-renderer@">=16.0.0" from @testing-library/react-native@7.2.0
npm ERR! node_modules/@testing-library/react-native
npm ERR! dev @testing-library/react-native@"^7.2.0" 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\YOON\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\YOON\AppData\Local\npm-cache\_logs\2022-02-12T15_32_10_117Z-debug-0.log원래 쳤던 명령어 뒤에 --save --legacy-peer-deps 를 추가로 입력해주면 됩니다.
예)
npm install --save --legacy-peer-deps
반응형'Frontend > React·React Native' 카테고리의 다른 글
왕빠른 Vite React를 사용하여 GitHub Pages 및 Storybook 자동 배포 설정하기 (3) 2023.05.12 React18의 useSyncExternalStore로 전역 상태 관리하기 (5) 2023.05.02 React에서 눈속임을 이용한 커스텀 비밀번호 만들기 (카드 번호 절반만 숨기기) (0) 2023.04.27 React에서 Context API로 상태 관리하기 (with Typescript) (4) 2023.04.17 [React Native] Expo에 Android Studio 에뮬레이터 연결하기 (3) 2022.05.06