[문제해결] "Could not resolve dependency: react-redux@"^8.0.0" from the root project"
문제
ckeditor5 패키지 삭제 중 npm 에러가 발생하였다.
Could not resolve dependency: react-redux@"^8.0.0" from the root project...
Fix the upstream dependency conflict, or retry
this command with --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
해결
패키지 버전 종속성 문제를 해결하기 위해 아래 명령을 시도해보았다.
npm install --legacy-peer-deps
--legacy-peer-deps의 역할
npm 7으로 업데이트되면서 peer dependencies 자동 설치를 해주는데, 이 peer dependencies의 충돌이 있을 때 해결하는 선택지 중 하나가 바로 --legacy-peer-deps옵션이다.
--legacy-peer-deps은 peer dependencies의 충돌을 무시하고 패키지를 설치해줘서 문제를 해결할 수 있었다.
특정 모듈에 대한 PeerDependency를 확인하는 방법
npm 자체는 특정 모듈의 페이지에 peer dependencies를 나열하지 않는다. 설치 전이나 후에 peer dependencies를 확인하는 방법은 아래 명령어를 입력하면 알 수 있다.
npm info [모듈명] peerDependencies
CKEditor 에디터 설치 후 추가 plugin을 나온 이슈 보러가기
반응형
'문제해결' 카테고리의 다른 글
[문제해결] "error: remote origin already exists" (0) | 2023.09.04 |
---|---|
[문제해결] CKEditor5, "Uncaught CKEditorError: ckeditor-duplicated-modules" (0) | 2023.09.01 |
next.js 에서 scss적용하기(ft.MUI Material UI) (0) | 2023.08.31 |
[문제해결] "expo-app-loading is deprecated in favor of expo-splash-screen" (0) | 2023.08.28 |
[문제해결][bitbucket] 구글계정으로 push 시 fatal: Authentication failed for ... 에러 (0) | 2023.06.26 |