react-sortable-tree icon indicating copy to clipboard operation
react-sortable-tree copied to clipboard

Unable to npm install in Next JS

Open ChoLianJiet opened this issue 3 years ago • 2 comments

I have tried to npm install react-sortable-tree --save in my Next JS Project but i got this error

PS C:\NextJs\development\testing-interactive-pdf-app> npm install react-sortable-tree --save   
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: testing-interactive-pdf-app@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.3.0" from [email protected]
npm ERR! node_modules/react-sortable-tree
npm ERR!   react-sortable-tree@"*" 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\lianj\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\lianj\AppData\Local\npm-cache\_logs\2022-01-05T07_41_02_753Z-debug-0.log

In the npm-cache log, it looks like this

0 verbose cli [
0 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli   'C:\\Users\\lianj\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli   'install',
0 verbose cli   'react-sortable-tree',
0 verbose cli   '--save'
0 verbose cli ]
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:C:\Users\lianj\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 2ms
6 timing config:load:builtin Completed in 3ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:C:\NextJs\development\testing-interactive-pdf-app\.npmrc Completed in 1ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:C:\Users\lianj\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\lianj\AppData\Roaming\npm\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 1ms
18 timing config:load Completed in 9ms
19 timing npm:load:configload Completed in 9ms
20 timing npm:load:setTitle Completed in 0ms
21 timing config:load:flatten Completed in 2ms
22 timing npm:load:display Completed in 3ms
23 verbose logfile C:\Users\lianj\AppData\Local\npm-cache\_logs\2022-01-05T07_41_02_753Z-debug-0.log
24 timing npm:load:logFile Completed in 7ms
25 timing npm:load:timers Completed in 0ms
26 timing npm:load:configScope Completed in 0ms
27 timing npm:load Completed in 22ms
28 timing arborist:ctor Completed in 0ms
29 silly logfile start cleaning logs, removing 1 files
30 timing idealTree:init Completed in 404ms
31 timing idealTree:userRequests Completed in 4ms
32 silly idealTree buildDeps
33 silly fetch manifest react-sortable-tree@*
34 timing arborist:ctor Completed in 0ms
35 http fetch GET 200 https://registry.npmjs.org/react-sortable-tree 479ms (cache revalidated)
36 silly fetch manifest [email protected]
37 http fetch GET 200 https://registry.npmjs.org/react 53ms (cache revalidated)
38 silly fetch manifest react@^16.3.0
39 timing idealTree Completed in 960ms
40 timing command:install Completed in 975ms
41 verbose stack Error: unable to resolve dependency tree
41 verbose stack     at Arborist.[failPeerConflict] (C:\Users\lianj\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1362:25)
41 verbose stack     at Arborist.[loadPeerSet] (C:\Users\lianj\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1328:34)
41 verbose stack     at async Arborist.[buildDepStep] (C:\Users\lianj\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:935:11)
41 verbose stack     at async Arborist.buildIdealTree (C:\Users\lianj\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:216:7)
41 verbose stack     at async Promise.all (index 1)
41 verbose stack     at async Arborist.reify (C:\Users\lianj\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:149:5)
41 verbose stack     at async Install.exec (C:\Users\lianj\AppData\Roaming\npm\node_modules\npm\lib\commands\install.js:157:5)
41 verbose stack     at async module.exports (C:\Users\lianj\AppData\Roaming\npm\node_modules\npm\lib\cli.js:66:5)
42 verbose cwd C:\NextJs\development\testing-interactive-pdf-app
43 verbose Windows_NT 10.0.19042
44 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\lianj\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "react-sortable-tree" "--save"
45 verbose node v16.13.0
46 verbose npm  v8.3.0
47 error code ERESOLVE
48 error ERESOLVE unable to resolve dependency tree
49 error
50 error While resolving: [1mtesting-interactive-pdf-app[22m@[1mundefined[22m
50 error Found: [1mreact[22m@[1m17.0.2[22m[2m[22m
50 error [2mnode_modules/react[22m
50 error   [1mreact[22m@"[1m17.0.2[22m" from the root project
50 error
50 error Could not resolve dependency:
50 error [35mpeer[39m [1mreact[22m@"[1m^16.3.0[22m" from [1mreact-sortable-tree[22m@[1m2.8.0[22m[2m[22m
50 error [2mnode_modules/react-sortable-tree[22m
50 error   [1mreact-sortable-tree[22m@"[1m*[22m" from the root project
50 error
50 error Fix the upstream dependency conflict, or retry
50 error this command with --force, or --legacy-peer-deps
50 error to accept an incorrect (and potentially broken) dependency resolution.
50 error
50 error See C:\Users\lianj\AppData\Local\npm-cache\eresolve-report.txt for a full report.
51 verbose exit 1
52 timing npm Completed in 1316ms
53 verbose unfinished npm timer reify 1641368463079
54 verbose unfinished npm timer reify:loadTrees 1641368463091
55 verbose unfinished npm timer idealTree:buildDeps 1641368463501
56 verbose unfinished npm timer idealTree:#root 1641368463501
57 verbose code 1
58 error A complete log of this run can be found in:
58 error     C:\Users\lianj\AppData\Local\npm-cache\_logs\2022-01-05T07_41_02_753Z-debug-0.log

ChoLianJiet avatar Jan 05 '22 07:01 ChoLianJiet

I have got the same problem

sxidsvit avatar Jan 26 '22 20:01 sxidsvit

Try this version

npm install @nosferatu500/react-sortable-tree --save

nicoclau avatar Feb 02 '22 21:02 nicoclau