I am trying to install react-tinder-card in my current project.So i am tring to install the react-tinder-card but after i use the command
npm install –save react-tinder-card
All i can see in my console is:
JavaScript
x
22
22
1
npm ERR! code ERESOLVE
2
npm ERR! ERESOLVE unable to resolve dependency tree
3
npm ERR!
4
npm ERR! While resolving: tinder-clone@0.1.0
5
npm ERR! Found: react@17.0.1
6
npm ERR! node_modules/react
7
npm ERR! react@"^17.0.1" from the root project
8
npm ERR!
9
npm ERR! Could not resolve dependency:
10
npm ERR! peer react@"^16.8.0" from react-tinder-card@1.3.1
11
npm ERR! node_modules/react-tinder-card
12
npm ERR! react-tinder-card@"*" from the root project
13
npm ERR!
14
npm ERR! Fix the upstream dependency conflict, or retry
15
npm ERR! this command with --force, or --legacy-peer-deps
16
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
17
npm ERR!
18
npm ERR! See /home/nero/.npm/eresolve-report.txt for a full report.
19
20
npm ERR! A complete log of this run can be found in:
21
npm ERR! /home/nero/.npm/_logs/2020-11-06T16_36_39_957Z-debug.log
22
When i opened the debug.log file, i found this:
JavaScript
1
71
71
1
0 verbose cli [
2
0 verbose cli '/usr/bin/node',
3
0 verbose cli '/usr/bin/npm',
4
0 verbose cli 'install',
5
0 verbose cli '--save',
6
0 verbose cli 'react-tinder-card'
7
0 verbose cli ]
8
1 info using npm@7.0.3
9
2 info using node@v15.0.1
10
3 timing config:load:defaults Completed in 3ms
11
4 timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 0ms
12
5 timing config:load:builtin Completed in 1ms
13
6 timing config:load:cli Completed in 3ms
14
7 timing config:load:env Completed in 1ms
15
8 timing config:load:file:/home/nero/Documents/MERN/tinder-clone/.npmrc Completed in 1ms
16
9 timing config:load:project Completed in 2ms
17
10 timing config:load:file:/home/nero/.npmrc Completed in 0ms
18
11 timing config:load:user Completed in 0ms
19
12 timing config:load:file:/usr/etc/npmrc Completed in 0ms
20
13 timing config:load:global Completed in 0ms
21
14 timing config:load:cafile Completed in 0ms
22
15 timing config:load:validate Completed in 0ms
23
16 timing config:load:setUserAgent Completed in 0ms
24
17 timing config:load:setEnvs Completed in 1ms
25
18 timing config:load Completed in 12ms
26
19 verbose npm-session b46c4469ef66a9f2
27
20 timing npm:load Completed in 19ms
28
21 timing arborist:ctor Completed in 0ms
29
22 timing idealTree:init Completed in 1413ms
30
23 timing idealTree:userRequests Completed in 3ms
31
24 silly idealTree buildDeps
32
25 silly fetch manifest react-tinder-card@*
33
26 http fetch GET 200 https://registry.npmjs.org/react-tinder-card 188ms (from cache)
34
27 silly fetch manifest react@^17.0.1
35
28 timing arborist:ctor Completed in 0ms
36
29 http fetch GET 304 https://registry.npmjs.org/react 1196ms (from cache)
37
30 timing idealTree Completed in 2812ms
38
31 timing command:install Completed in 2815ms
39
32 verbose stack Error: unable to resolve dependency tree
40
32 verbose stack at Arborist.[failPeerConflict] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1011:25)
41
32 verbose stack at Arborist.[loadPeerSet] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:991:36)
42
32 verbose stack at async Arborist.[buildDepStep] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:760:11)
43
32 verbose stack at async Arborist.buildIdealTree (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:202:7)
44
32 verbose stack at async Promise.all (index 1)
45
32 verbose stack at async Arborist.reify (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:121:5)
46
32 verbose stack at async install (/usr/lib/node_modules/npm/lib/install.js:40:5)
47
33 verbose cwd /home/nero/Documents/MERN/tinder-clone
48
34 verbose Linux 5.4.0-52-generic
49
35 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "--save" "react-tinder-card"
50
36 verbose node v15.0.1
51
37 verbose npm v7.0.3
52
38 error code ERESOLVE
53
39 error ERESOLVE unable to resolve dependency tree
54
40 error
55
41 error While resolving: [1mtinder-clone[22m@[1m0.1.0[22m
56
41 error Found: [1mreact[22m@[1m17.0.1[22m[2m[22m
57
41 error [2mnode_modules/react[22m
58
41 error [1mreact[22m@"[1m^17.0.1[22m" from the root project
59
41 error
60
41 error Could not resolve dependency:
61
41 error [35mpeer[39m [1mreact[22m@"[1m^16.8.0[22m" from [1mreact-tinder-card[22m@[1m1.3.1[22m[2m[22m
62
41 error [2mnode_modules/react-tinder-card[22m
63
41 error [1mreact-tinder-card[22m@"[1m*[22m" from the root project
64
41 error
65
41 error Fix the upstream dependency conflict, or retry
66
41 error this command with --force, or --legacy-peer-deps
67
41 error to accept an incorrect (and potentially broken) dependency resolution.
68
41 error
69
41 error See /home/nero/.npm/eresolve-report.txt for a full report.
70
42 verbose exit 1
71
I don’t understand what that means. Please help me find the solution.Any sort of help would be appreciated. Thank you in advance.
Advertisement
Answer
https://www.apollographql.com/docs/react/migrating/apollo-client-3-migration/
The react-apollo package has been deprecated, and the functionality offered by each of the above packages can now be accessed from @apollo/client directly:
JavaScript
1
5
1
@apollo/react-hooks -> now available directly from @apollo/client
2
@apollo/react-components -> now available from @apollo/client/react/components
3
@apollo/react-hoc -> now available from @apollo/client/react/hoc
4
@apollo/react-ssr -> now available from @apollo/client/react/ssr
5
@apollo/react-testing -> now available from @apollo/client/testing