react-simple-image-viewer를 설치하는 중 아래와 같은 에러가 발생했다.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: baro-web-v2@1.0.0
npm ERR! Found: react@16.14.0
npm ERR! node_modules/react
npm ERR! react@"^16.6.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.0" from react-simple-image-viewer@1.2.1
npm ERR! node_modules/react-simple-image-viewer
npm ERR! react-simple-image-viewer@"*" 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.
명령어 뒤에 --legacy-peer-deps를 붙이면 해결할 수 있다.
'React.js' 카테고리의 다른 글
[React] html 태그가 적용된 상태로 텍스트 나타내기 (0) | 2022.06.08 |
---|---|
[React] Enter 입력시 Event 발생시키기 (0) | 2022.05.31 |
[React] Login 및 Token 관리 (0) | 2022.05.26 |
[React] Copy to clipborad (0) | 2022.05.20 |
[React] react-router-dom v6 Navigate (0) | 2022.05.19 |