npm i typescript 충돌 오류
npm i typescript 작성 시 아래와 같은 오류가 뜹니다. 종속성 해결 과정에서 충돌이 발생한 것으로 보이는데, 여기서 --force를 해서 설치를 하면 실행 될 것 같긴한데 그렇게 했을때는 결국 문제가 터졌던 경험들이 있어서 어떻게 하면 되는지 잘 모르겠습니다.
/c/02WorkSpace/sleact/alecture (master)
$ npm i typescript
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-custom-scrollbars@4.2.1npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR! peer react@">=16.8.0" from @emotion/react@11.10.6
npm ERR! node_modules/@emotion/react
npm ERR! peer @emotion/react@"^11.0.0-rc.0" from @emotion/styled@11.10.6
npm ERR! node_modules/@emotion/styled
npm ERR! @emotion/styled@"^11.1.5" from the root
project
npm ERR! @emotion/react@"^11.1.5" from the root project
npm ERR! peer react@">=16.8.0" from @emotion/styled@11.10.6
npm ERR! node_modules/@emotion/styled
npm ERR! @emotion/styled@"^11.1.5" from the root project
npm ERR! 10 more (@emotion/use-insertion-effect-with-fallbacks, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^0.14.0 || ^15.0.0 || ^16.0.0" from react-custom-scrollbars@4.2.1
npm ERR! node_modules/react-custom-scrollbars
npm ERR! react-custom-scrollbars@"^4.2.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@16.14.0
npm ERR! node_modules/react
npm ERR! peer react@"^0.14.0 || ^15.0.0 || ^16.0.0" from react-custom-scrollbars@4.2.1
npm ERR! node_modules/react-custom-scrollbars
npm ERR! react-custom-scrollbars@"^4.2.1" from the
root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retrynpm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\KG.Park\AppData\Local\npm-cache\_logs\2023-05-16T00_56_02_463Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
답변 1
2
react-custom-scrollbars가 리액트17을 피어디펜던시로 추가하지 않아서 그렇습니다. 이 경우는 force해도 되긴한데 찝찝하다면
https://www.npmjs.com/package/react-custom-scrollbars-2
이걸 대신 쓰세요.
기본 셋팅과 관련하여
0
92
1
초기 셋팅 back과 front만 남겨두고 다 지운 후 진행 방법
0
96
2
focus 시에만 화면 업데이트 되는 이유 + 해결방법
0
150
2
useEffect 개수 관리
0
110
2
라이브러리 서치 방법
0
104
2
함수 정의 패턴
0
77
1
npm run dev 에러
0
152
3
npx webpack 후 에러
0
178
2
'void' 형식 식의 truthiness를 테스트할 수 없습니다.ts(1345)
0
144
2
사용자 가입시 에러발생 (TypeError: Cannot read properties of null (reading 'addMembers')
1
178
2
초기세팅중 packge.json 에러떠요
0
156
2
CORS - Access-Control-Allow-Origin 누락 문제
0
431
3
로그인 페이지 무한 새로고침 현상
0
598
2
Module not found: Error: Can't resolve './App' 에러
0
959
1
배포 방법
0
298
2
npm run dev 시 빌드가 매우 느려졌습니다
0
990
2
alias 경로 설정 오류
0
452
2
fetcher 함수의 data 값이 두번 찍히는 이유
0
278
1
제네릭 질문
0
218
2
ts-node 대신 tsx 사용여부
0
373
1
배포 관련 질문
0
247
1
[nginx + https] 서비스를 실행하면 niginx가 아닌 서비스 화면을 보여주게 하고 싶습니다.
0
385
2
[배포하기] webpack에 aws 퍼블릭 IPv4 주소 와 포트 주소를 작성하고 나서 빌드후 실행하면 오류가 발생합니다.
0
336
1
users 호출 시 쿠키가 담기지 않는 이슈 질문드립니다.
0
247
2





