programing

npm react-facebook-login 설치 시 "ERESOLVE가 의존관계 트리를 해결할 수 없음"

sourcejob 2023. 3. 20. 23:10
반응형

npm react-facebook-login 설치 시 "ERESOLVE가 의존관계 트리를 해결할 수 없음"

「」를 인스톨 중npm react-facebook-login내 리액션 앱에서 계속 의존성 오류가 발생합니까?무섭게 들리네요.앞으로 고장날 수 있는 것을 억지로 설치하고 싶지 않아요.javascript jav 、 떻 jav jav jav jav jav jav jav jav jav jav jav jav?

npm 캐시를 지우고 노드 모듈을 제거한 후 다시 설치하려고 시도했지만 여전히 이 오류가 발생합니다.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: buckets@0.1.0
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR!   react@"^17.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.0.0" from react-facebook-login@4.1.1
npm ERR! node_modules/react-facebook-login
npm ERR!   react-facebook-login@"*" 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 /home/user/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2021-01-03T12_23_40_000Z-debug.log

debug log:

0 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', 'react-facebook-login' ]
1 info using npm@7.0.15
2 info using node@v15.4.0
3 timing config:load:defaults Completed in 4ms
4 timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 12ms
5 timing config:load:builtin Completed in 12ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 1ms
8 timing config:load:file:/home/user/app/frontend/buckets/.npmrc Completed in 0ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:/home/user/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/usr/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 21ms
19 verbose npm-session a80715ea0624d48b
20 timing npm:load Completed in 30ms
21 timing arborist:ctor Completed in 1ms
22 timing idealTree:init Completed in 1531ms
23 timing idealTree:userRequests Completed in 4ms
24 silly idealTree buildDeps
25 silly fetch manifest react-facebook-login@*
26 http fetch GET 200 https://registry.npmjs.org/react-facebook-login 2249ms
27 silly fetch manifest react@^17.0.1
28 http fetch GET 200 https://registry.npmjs.org/react 142ms
29 timing idealTree Completed in 3940ms
30 timing command:install Completed in 3944ms
31 verbose stack Error: unable to resolve dependency tree
31 verbose stack     at Arborist.[failPeerConflict] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1045:25)
31 verbose stack     at Arborist.[loadPeerSet] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1025:36)
31 verbose stack     at async Arborist.[buildDepStep] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:781:11)
31 verbose stack     at async Arborist.buildIdealTree (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:209:7)
31 verbose stack     at async Promise.all (index 1)
31 verbose stack     at async Arborist.reify (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:122:5)
31 verbose stack     at async install (/usr/lib/node_modules/npm/lib/install.js:39:3)
32 verbose cwd /home/user/app/frontend/buckets
33 verbose Linux 5.4.0-58-generic
34 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "react-facebook-login"
35 verbose node v15.4.0
36 verbose npm  v7.0.15
37 error code ERESOLVE
38 error ERESOLVE unable to resolve dependency tree
39 error
40 error While resolving: [1mbuckets[22m@[1m0.1.0[22m
40 error Found: [1mreact[22m@[1m17.0.1[22m[2m[22m
40 error [2mnode_modules/react[22m
40 error   [1mreact[22m@"[1m^17.0.1[22m" from the root project
40 error
40 error Could not resolve dependency:
40 error [35mpeer[39m [1mreact[22m@"[1m^16.0.0[22m" from [1mreact-facebook-login[22m@[1m4.1.1[22m[2m[22m
40 error [2mnode_modules/react-facebook-login[22m
40 error   [1mreact-facebook-login[22m@"[1m*[22m" from the root project
40 error
40 error Fix the upstream dependency conflict, or retry
40 error this command with --force, or --legacy-peer-deps
40 error to accept an incorrect (and potentially broken) dependency resolution.
40 error
40 error See /home/user/.npm/eresolve-report.txt for a full report.
41 verbose exit 1

어떻게 하면 앞으로 문제를 일으키지 않고 극복할 수 있을까요?도와주셔서 감사합니다.

npm 7 입니다.삼십육십육계 한 번 더 .--legacy-peer-deps옵션을 지정합니다.

npm install react-facebook-login --legacy-peer-deps

★★npm install" " " " " " : "

yarn install

그리고 효과가 있다!

감사해요.

저도 이 문제에 직면해 있습니다.그리고 리액트 어플리케이션을 실행하려고 하고 있었습니다.

npm install --legacy-peer-deps를 실행하여 해결했습니다.

정상적으로 시작한 후

그그음음음음음음음음음음음음음음음 i i i i i i i i i i i i i i를 업그레이드한 후 (했습니다.npm6시 7분이다.

npm ERR! 코드 ERESOLVE npm ERR! ERESOLVE가 종속성 트리를 해결할 수 없습니다.

...

npm ERR!업스트림 의존관계 경합을 수정하거나 --force 또는 --legacy-peer-deps를 사용하여 이 명령을 재시도하여 잘못된(및 잠재적으로 끊어진) 의존관계 해결을 수락합니다.

경우에는 내, 둘, 둘, 둘 중 하나를 합니다.--legacy-peer-deps ★★★★★★★★★★★★★★★★★」--force이치노

저는 '아예'를 하려고 했습니다.node_modules,package-lock.json및 를 사용하여 .yarn install이것에 의해, yarn.lock 파일이 생성되어 이후의 npm 실행에서는 정상적으로 동작하는 것처럼 보이는 새로운 package-lock.json이 작성되었습니다.

p.s.입니다. 이것은 임시방편입니다.npm합니다.7이면 충분합니다.후 yourn하고 node_modules를 사용하여 .npm.

rm -rf node_modules
rm package-lock.json 
yarn install 
# generates a yarn.lock file and a new package-lock.json

# continue with npm 
npm start

마지막 --force 또는 --legacy-peer-deps에서 사용합니다.

예:-

npm install --force

또는

npm install --legacy-peer-deps

이해 주세요.을 사용하다--legacy-peer-deps

저에게 명령어는

npm install @reduxjs/toolkit react-redux

그리고 나는 덧붙였다.

npm install @reduxjs/toolkit react-redux --legacy-peer-deps

그리고 쾅 하고 작동한다.

실행해 보다

npm update

특히 버전이 오래된 파이어베이스 패키지가 원인이 되어 피어(peer)와 경합하는 경우.@snehal의 제안대로 문제를 해결했습니다.

다음을 사용할 수 있습니다.

npm install angular-google-charts --legacy-peer-deps

저장하려는 경우 다음과 같이 하십시오.

npm install --save angular-google-charts --legacy-peer-deps
@react-native-firebase/app@12.6.1
├── @react-native-firebase/auth@12.6.1
├── @react-native-firebase/firestore@12.7.1

에는 이 of of of음음음 notice notice notice notice notice notice notice notice notice notice notice notice notice 。12.7.1는 모두 「」를 가지고 있습니다.12.6.1일관성을 firestore가 말한 합니다.firestore는 과 같습니다.이러한 현상이 발생하지 않으면 앞서 말한 오류가 발생합니다.

버전 첫 번째 번호가 변경되지 않을 때까지 --syslog-peer-deps를 사용하면 결과가 [설치된 패키지 목록 가져오기]를 약간 상회할 수 있습니다.npm ls --depth=0,

그러나 모든 버전이 동일한 경우 다음을 수행할 수 있습니다.

  • 유형npm update그리고 모든 패키지가 최신 버전으로 업데이트되며, 버전 대부분은 두 번째 번호가 변경됩니다.를 사용할 수도 있습니다.npm update에러를 해결하기 위해서 필요한 패키지만 갱신합니다.

  • 에 의해 모듈의 특정 버전을 설치합니다.npm install [package-name]@[version-number]

추가만 하면 됩니다.--force이 에러의 해결에 도움이 됩니다.

yarn install --force

node_modules를 삭제하고 다음을 실행합니다.

npm install

npm install을 실행 중이었는데 작동하지 않았습니다.그런 다음 --legacy-peer-deps 명령을 npm install 명령어와 함께 사용했습니다.그것으로 내 문제가 해결되었다.

npm install --pm-peer-deps

다음 코드를 사용해 보세요.괜찮을 거예요.

npm install --save react-peer-deps --save-peer-deps

패키지를 잘못된 파일 경로에 설치하려고 할 수 있습니다.

언급URL : https://stackoverflow.com/questions/65549858/eresolve-unable-to-resolve-dependency-tree-when-installing-npm-react-facebook

반응형