Reputation: 13
As title, when I trying run the npm install @stripe/[email protected] @stripe/[email protected] -s in the terminal but failed to install.
When I try to run npm install @stripe/[email protected] @stripe/[email protected] which without -s, it shows the following messages in the terminal:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @testing-library/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! peer react@">=16.3.2" from @restart/[email protected]
npm ERR! node_modules/@restart/context
npm ERR! @restart/context@"^2.1.4" from [email protected]
npm ERR! node_modules/react-bootstrap
npm ERR! react-bootstrap@"^1.5.2" from the root project
npm ERR! peer react@">=16.8.0" from @restart/[email protected]
npm ERR! node_modules/@restart/hooks
npm ERR! @restart/hooks@"^0.3.26" from [email protected]
npm ERR! node_modules/react-bootstrap
npm ERR! react-bootstrap@"^1.5.2" from the root project
npm ERR! 19 more (prop-types-extra, qrcode.react, react-bootstrap, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^18.0.0" from @testing-library/[email protected]
npm ERR! node_modules/@testing-library/react
npm ERR! @testing-library/react@"^13.4.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR! peer react@"^18.0.0" from @testing-library/[email protected]
npm ERR! node_modules/@testing-library/react
npm ERR! @testing-library/react@"^13.4.0" 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 /Users/chingkarlok/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/chingkarlok/.npm/_logs/2022-10-06T03_42_21_140Z-debug-0.log
Below is the complete log of this run that found in /Users/chingkarlok/.npm/_logs/2022-10-06T03_42_21_140Z-debug-0.log
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 0ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 0ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/Users/chingkarlok/Desktop/QRMenu/qrmenu_frontend/.npmrc Completed in 0ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:/Users/chingkarlok/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 0ms
18 timing config:load Completed in 5ms
19 timing npm:load:configload Completed in 5ms
20 timing npm:load:mkdirpcache Completed in 2ms
21 timing npm:load:mkdirplogs Completed in 1ms
22 verbose title npm install @stripe/[email protected] @stripe/[email protected]
23 verbose argv "install" "@stripe/[email protected]" "@stripe/[email protected]"
24 timing npm:load:setTitle Completed in 9ms
25 timing config:load:flatten Completed in 1ms
26 timing npm:load:display Completed in 2ms
27 verbose logfile logs-max:10 dir:/Users/chingkarlok/.npm/_logs
28 verbose logfile /Users/chingkarlok/.npm/_logs/2022-10-06T03_42_21_140Z-debug-0.log
29 timing npm:load:logFile Completed in 2ms
30 timing npm:load:timers Completed in 1ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 22ms
33 timing arborist:ctor Completed in 1ms
34 silly logfile start cleaning logs, removing 1 files
35 silly logfile done cleaning log files
36 timing idealTree:init Completed in 325ms
37 timing idealTree:userRequests Completed in 1ms
38 silly idealTree buildDeps
39 silly fetch manifest @stripe/[email protected]
40 timing arborist:ctor Completed in 0ms
41 http fetch GET 200 https://registry.npmjs.org/@stripe%2freact-stripe-js 265ms (cache hit)
42 silly fetch manifest @stripe/[email protected]
43 http fetch GET 200 https://registry.npmjs.org/@stripe%2fstripe-js 5ms (cache hit)
44 silly fetch manifest react@^17.0.2
45 http fetch GET 200 https://registry.npmjs.org/react 5ms (cache hit)
46 silly fetch manifest react-dom@^17.0.2
47 http fetch GET 200 https://registry.npmjs.org/react-dom 5ms (cache hit)
48 silly placeDep ROOT @stripe/[email protected] OK for: [email protected] want: 1.4.0
49 silly placeDep ROOT @stripe/[email protected] OK for: @stripe/[email protected] want: ^1.13.0
50 silly placeDep ROOT @stripe/[email protected] REPLACE for: [email protected] want: 1.13.2
51 timing idealTree:#root Completed in 303ms
52 timing idealTree:node_modules/@stripe/react-stripe-js Completed in 0ms
53 timing idealTree:node_modules/@stripe/stripe-js Completed in 0ms
54 silly fetch manifest react@^18.0.0
55 silly fetch manifest react-dom@^18.0.0
56 timing idealTree Completed in 632ms
57 timing command:install Completed in 641ms
58 verbose stack Error: could not resolve
58 verbose stack at PlaceDep.failPeerConflict (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:549:25)
58 verbose stack at PlaceDep.place (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:199:21)
58 verbose stack at new PlaceDep (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:73:10)
58 verbose stack at /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:990:31
58 verbose stack at Array.map (<anonymous>)
58 verbose stack at Arborist.[buildDepStep] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:990:8)
58 verbose stack at async Arborist.buildIdealTree (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:218:7)
58 verbose stack at async Promise.all (index 1)
58 verbose stack at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:154:5)
58 verbose stack at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:145:5)
59 verbose cwd /Users/chingkarlok/Desktop/QRMenu/qrmenu_frontend
60 verbose Darwin 20.3.0
61 verbose node v16.17.0
62 verbose npm v8.15.0
63 error code ERESOLVE
64 error ERESOLVE could not resolve
65 error
66 error While resolving: [1m@testing-library/react[22m@[1m13.4.0[22m
66 error Found: [1mreact[22m@[1m17.0.2[22m[2m[22m
66 error [2mnode_modules/react[22m
66 error [35mpeer[39m [1mreact[22m@"[1m>=16.3.2[22m" from [1m@restart/context[22m@[1m2.1.4[22m[2m[22m
66 error [2mnode_modules/@restart/context[22m
66 error [1m@restart/context[22m@"[1m^2.1.4[22m" from [1mreact-bootstrap[22m@[1m1.5.2[22m[2m[22m
66 error [2mnode_modules/react-bootstrap[22m
66 error [1mreact-bootstrap[22m@"[1m^1.5.2[22m" from the root project
66 error [35mpeer[39m [1mreact[22m@"[1m>=16.8.0[22m" from [1m@restart/hooks[22m@[1m0.3.27[22m[2m[22m
66 error [2mnode_modules/@restart/hooks[22m
66 error [1m@restart/hooks[22m@"[1m^0.3.26[22m" from [1mreact-bootstrap[22m@[1m1.5.2[22m[2m[22m
66 error [2mnode_modules/react-bootstrap[22m
66 error [1mreact-bootstrap[22m@"[1m^1.5.2[22m" from the root project
66 error 19 more (prop-types-extra, qrcode.react, react-bootstrap, ...)
66 error
66 error Could not resolve dependency:
66 error [35mpeer[39m [1mreact[22m@"[1m^18.0.0[22m" from [1m@testing-library/react[22m@[1m13.4.0[22m[2m[22m
66 error [2mnode_modules/@testing-library/react[22m
66 error [1m@testing-library/react[22m@"[1m^13.4.0[22m" from the root project
66 error
66 error Conflicting peer dependency: [1mreact[22m@[1m18.2.0[22m[2m[22m
66 error [2mnode_modules/react[22m
66 error [35mpeer[39m [1mreact[22m@"[1m^18.0.0[22m" from [1m@testing-library/react[22m@[1m13.4.0[22m[2m[22m
66 error [2mnode_modules/@testing-library/react[22m
66 error [1m@testing-library/react[22m@"[1m^13.4.0[22m" from the root project
66 error
66 error Fix the upstream dependency conflict, or retry
66 error this command with --force, or --legacy-peer-deps
66 error to accept an incorrect (and potentially broken) dependency resolution.
66 error
66 error See /Users/chingkarlok/.npm/eresolve-report.txt for a full report.
67 verbose exit 1
68 timing npm Completed in 723ms
69 verbose unfinished npm timer reify 1665027741218
70 verbose unfinished npm timer reify:loadTrees 1665027741226
71 verbose unfinished npm timer idealTree:buildDeps 1665027741552
72 verbose unfinished npm timer idealTree:node_modules/@testing-library/react 1665027741855
73 verbose code 1
74 error A complete log of this run can be found in:
74 error /Users/chingkarlok/.npm/_logs/2022-10-06T03_42_21_140Z-debug-0.log
package.json
"name": "qrmenu_frontend",
"version": "0.1.0",
"private": true,
"proxy": "http://localhost:8000",
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"bootstrap": "^4.6.0",
"qrcode.react": "^3.1.0",
"react": "^17.0.2",
"react-bootstrap": "^1.5.2",
"react-dom": "^17.0.2",
"react-dropzone": "^11.3.2",
"react-icons": "^4.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "^5.0.1",
"react-to-print": "^2.14.7",
"react-toastify": "^7.0.3",
"styled-components": "^5.2.3",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
May I know what's wrong here?
Upvotes: 0
Views: 663
Reputation: 1981
Looks like you have a dependency conflict between [email protected] and [email protected]. Why don't you just run
npm install --save @stripe/react-stripe-js @stripe/stripe-js
like Stripe Doc suggested?
Upvotes: 0