[오류해결] npm install 설치시 npm ERR! code ERESOLVE

React App 실행 시 node_modules 설치를 위해
npm install 입력했을 때

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^18.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"<18.0.0" from @testing-library/[email protected]
npm ERR! node_modules/@testing-library/react
npm ERR!   @testing-library/react@"^12.1.4" from the root project

와 같은 에러 발생


React 버전 문제 때문에 일어나는 문제 인거 같으며

npm install 뒤에 --save --legacy-peer-deps 를 입력하면 된다

npm install --save --legacy-peer-deps

좋은 웹페이지 즐겨찾기