| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
- 의존성문제
- react npm install
- legacy-peer
- 그누보드반응형
- maxwidth
- vscode git clone
- owlcarousel
- Git clone
- 이미지반응형
- slickslider
- npm install 문제
- 단어단위로떨어지기
- npm start
- package.json
- node 오류
- googleicon
- fontawesome
- XEIcon
- minwidth
- 플러그인
- git lab clone
- window 정책변경
- 정적객체
- 웹아이콘
- 글자들여쓰기
- 아이콘사용법
- node설치
- 동적객체
- MediaQuery
- npm install
- Today
- Total
어쩌다 알게 된 ƪ(•̃͡•̃͡ ƪ
🟦 [React] npm install 패키지 의존성 오류 / npm install --legacy-peer-deps 명령어 본문
🟦 [React] npm install 패키지 의존성 오류 / npm install --legacy-peer-deps 명령어
비니_ 2025. 3. 27. 20:25전달받은 React 폴더에서 npm start를 하려니 오류가 나서
node_modules 폴더를 일단 지우고 다시 npm install 진행 하는데 또 오류가 났다
대충 이런내용..
npm warn node_modules/@react-spring/three npm warn ERESOLVE overriding peer dependency npm error code ERESOLVE npm error ERESOLVE could not resolve npm error npm error While resolving: @toast-ui/react-editor@3.2.3 npm error Found: react@18.3.1 npm error node_modules/react npm error peer react@"^19.0.0" from react-native@0.78.1 npm error node_modules/react-native npm error peer react-native@">=0.58" from @react-spring/native@9.7.3 npm error node_modules/@react-spring/native npm error @react-spring/native@"~9.7.3" from react-spring@9.7.3 npm error node_modules/react-spring npm error react-spring@"^9.7.2" from the root project npm error npm error Could not resolve dependency: npm error peer react@"^17.0.1" from @toast-ui/react-editor@3.2.3
찾아보니 의존성 문제라는데
나는 react@18.3.1을 쓰고 있고 여기서 사용하는 패키지들은 react@17.~ 버전을 요구해서 발생하는 에러인 것 같다
npm install --legacy-peer-deps
라는 명령어를 사용하라는데
👇 명령어 설명 👇
npm 7 이상에서 도입된 peer dependency 충돌을 무시하고 설치를 진행하도록 도와줍니다.
즉, 의존성 충돌을 해결하려고 시도하지 않고, 의존성에 맞춰 강제로 설치하게 되므로 다른 라이브러리와의 호환성에 문제가 없을 가능성이 높습니다.

설치도 잘 되었고, npm start도 다시 하니 잘 된다!
더 폴더 분석을 해봐야 되겠지만..
아으 너무 어려웡..

'개발 > 🟦 React' 카테고리의 다른 글
| 🟦 [React] 어떤 빌드 도구를 사용하는지 알아보는 법 (ex. Vite, Next.js, CRA) (0) | 2025.03.29 |
|---|---|
| 🟦 [React] useTranslation() 란? 국제화, 다국어 번역 (0) | 2025.03.29 |
| 🟦 [React] input에서 Enter시 함수 실행하기 (0) | 2025.03.24 |
| 🟦 [React] 지역변수를 전역변수로 만들고 싶을 때 (1) | 2025.03.24 |
| 🟦 [React] console.log가 setFilteredResult: function () { [native code] } 이렇게 뜰 때 (0) | 2025.03.24 |