안녕하세요, React 프로젝트에서 npm install을 하면 아래와 같은 에러가 발생합니다.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: my-app@0.1.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR! react@"^18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.0" from some-old-library@1.2.3
React 18을 사용 중인데, 설치하려는 라이브러리가 React 17을 요구하는 것 같습니다. 어떻게 해결할 수 있을까요? --force나 --legacy-peer-deps를 쓰면 되는 건지, 혹시 부작용이 있는지 궁금합니다.
댓글 0