npm 설치 문제를 어떻게 해결할 수 있나요?

npm 설치 문제를 어떻게 해결할 수 있나요?

안녕하세요 에 문제가 있습니다 npm install. 오류가 발생합니다. 어떻게 해결할 수 있나요?

npm install
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @use-it/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   react@"^17.0.2" from the root project
npm WARN   32 more (@devexpress/dx-react-core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0" from @use-it/[email protected]
npm WARN node_modules/@use-it/event-listener
npm WARN   @use-it/event-listener@"^0.1.2" from [email protected]
npm WARN   node_modules/use-dark-mode
npm WARN   1 more (use-persisted-state)
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0" from @use-it/[email protected]
npm WARN   node_modules/@use-it/event-listener
npm WARN     @use-it/event-listener@"^0.1.2" from [email protected]
npm WARN     node_modules/use-dark-mode
npm WARN     1 more (use-persisted-state)
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/prettier
npm ERR!   prettier@"^2.3.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer prettier@"^1.3.1" from [email protected]
npm ERR! node_modules/prettierrc
npm ERR!   prettierrc@"0.0.0-5" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/prettier
npm ERR!   peer prettier@"^1.3.1" from [email protected]
npm ERR!   node_modules/prettierrc
npm ERR!     prettierrc@"0.0.0-5" 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.
npm ERR!
npm ERR! See C:\Users\{user}\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\{user}\AppData\Local\npm-cache\_logs\2022-06-22T15_37_55_849Z-debug-0.log

답변1

다중 반응 버전 충돌을 사용 npm i --force하거나 npm i ----legacy-peer-deps수정합니다.

관련 정보