Unhandled Rejection! This is a bug and should be reported
riesentoaster opened this issue · 2 comments
What happened
I attempted to upgrade some dependencies, don't remember what exact upgrades I chose. It broke and I used ncu
to try to upgrade additional dependencies to see if that would fix the error. I don't think I could reproduce the steps. If this report doesn't help, please feel free to close the issue, just wanted to leave this here in case someone can find some information from this.
Some version:
- ncu: 17.1.3
- node: v21.6.1
- macOS 14.7 on a M1 Macbook Pro
Logs
valentinhuber@Klaptop deep % ncu -ui
Upgrading /Users/valentinhuber/GitHub/deep/package.json
[====================] 43/43 100%
✔ Choose which packages to update ›
@typescript-eslint/eslint-plugin ^6.21.0 → ^8.7.0
✔ Run npm install to install new versions? … yes
Installing dependencies...
npm ERR!
code ERESOLVE
npm ERR!
ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: eslint-plugin-react-hooks@4.6.2
npm ERR! Found: eslint@9.11.1
npm ERR! node_modules/eslint
npm ERR! eslint@"^9.11.1" from the root project
npm ERR! peer eslint@"^6.0.0 || ^7.0.0 || >=8.0.0" from @eslint-community/eslint-utils@4.4.0
npm ERR!
node_modules/@eslint-community/eslint-utils
npm ERR! @eslint-community/eslint-utils@"^4.2.0" from eslint@9.11.1
npm ERR! @eslint-community/eslint-utils@"^4.4.0" from @typescript-eslint/utils@8.7.0
npm ERR! node_modules/@typescript-eslint/utils
npm ERR! @typescript-eslint/utils@"8.7.0" from @typescript-eslint/eslint-plugin@8.7.0
npm ERR! node_modules/@typescript-eslint/eslint-plugin
npm ERR! @typescript-eslint/eslint-plugin@"^8.7.0" from the root project
npm ERR! 1 more (@typescript-eslint/type-utils)
npm ERR! 6 more (eslint-plugin-jsx-a11y, eslint-plugin-react, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" from eslint-plugin-react-hooks@4.6.2
npm ERR! node_modules/eslint-plugin-react-hooks
npm ERR! eslint-plugin-react-hooks@"^4.6.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: eslint@8.57.1
npm ERR! node_modules/eslint
npm ERR! peer eslint@"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" from eslint-plugin-react-hooks@4.6.2
npm ERR! node_modules/eslint-plugin-react-hooks
npm ERR! eslint-plugin-react-hooks@"^4.6.2" 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!
npm ERR! For a full report see:
npm ERR! /Users/valentinhuber/.npm/_logs/2024-09-25T16_49_26_569Z-eresolve-report.txt
npm
ERR! A complete log of this run can be found in: /Users/valentinhuber/.npm/_logs/2024-09-25T16_49_26_569Z-debug-0.log
Error: npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: eslint-plugin-react-hooks@4.6.2
npm ERR! Found: eslint@9.11.1
npm ERR! node_modules/eslint
npm ERR! eslint@"^9.11.1" from the root project
npm ERR! peer eslint@"^6.0.0 || ^7.0.0 || >=8.0.0" from @eslint-community/eslint-utils@4.4.0
npm ERR! node_modules/@eslint-community/eslint-utils
npm ERR! @eslint-community/eslint-utils@"^4.2.0" from eslint@9.11.1
npm ERR! @eslint-community/eslint-utils@"^4.4.0" from @typescript-eslint/utils@8.7.0
npm ERR! node_modules/@typescript-eslint/utils
npm ERR! @typescript-eslint/utils@"8.7.0" from @typescript-eslint/eslint-plugin@8.7.0
npm ERR! node_modules/@typescript-eslint/eslint-plugin
npm ERR! @typescript-eslint/eslint-plugin@"^8.7.0" from the root project
npm ERR! 1 more (@typescript-eslint/type-utils)
npm ERR! 6 more (eslint-plugin-jsx-a11y, eslint-plugin-react, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" from eslint-plugin-react-hooks@4.6.2
npm ERR! node_modules/eslint-plugin-react-hooks
npm ERR! eslint-plugin-react-hooks@"^4.6.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: eslint@8.57.1
npm ERR! node_modules/eslint
npm ERR! peer eslint@"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" from eslint-plugin-react-hooks@4.6.2
npm ERR! node_modules/eslint-plugin-react-hooks
npm ERR! eslint-plugin-react-hooks@"^4.6.2" 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!
npm ERR! For a full report see:
npm ERR! /Users/valentinhuber/.npm/_logs/2024-09-25T16_49_26_569Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: /Users/valentinhuber/.npm/_logs/2024-09-25T16_49_26_569Z-debug-0.log
at /Users/valentinhuber/.nvm/versions/node/v21.6.1/lib/node_modules/npm-check-updates/build/index.js:540:2145
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Unhandled Rejection! This is a bug and should be reported: https://github.com/raineorshine/npm-check-updates/issues
Complete logs (from the path displayed)
0 verbose cli /Users/valentinhuber/.nvm/versions/node/v21.6.1/bin/node /Users/valentinhuber/.nvm/versions/node/v21.6.1/bin/npm
1 info using npm@10.2.4
2 info using node@v21.6.1
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 0ms
5 timing config:load:file:/Users/valentinhuber/.nvm/versions/node/v21.6.1/lib/node_modules/npm/npmrc Completed in 0ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/Users/valentinhuber/GitHub/deep/.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:/Users/valentinhuber/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/Users/valentinhuber/.nvm/versions/node/v21.6.1/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:setEnvs Completed in 1ms
16 timing config:load Completed in 4ms
17 timing npm:load:configload Completed in 4ms
18 timing config:load:flatten Completed in 1ms
19 timing npm:load:mkdirpcache Completed in 0ms
20 timing npm:load:mkdirplogs Completed in 0ms
21 verbose title npm install
22 verbose argv "install"
23 timing npm:load:setTitle Completed in 6ms
24 timing npm:load:display Completed in 0ms
25 verbose logfile logs-max:10 dir:/Users/valentinhuber/.npm/_logs/2024-09-25T16_49_26_569Z-
26 verbose logfile /Users/valentinhuber/.npm/_logs/2024-09-25T16_49_26_569Z-debug-0.log
27 timing npm:load:logFile Completed in 4ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 21ms
31 timing arborist:ctor Completed in 0ms
32 silly logfile start cleaning logs, removing 1 files
33 silly logfile done cleaning log files
34 timing idealTree:init Completed in 124ms
35 timing idealTree:userRequests Completed in 0ms
36 silly idealTree buildDeps
37 silly fetch manifest @typescript-eslint/eslint-plugin@^8.7.0
38 timing arborist:ctor Completed in 0ms
39 http fetch GET 200 https://registry.npmjs.org/@typescript-eslint%2feslint-plugin 229ms (cache revalidated)
40 silly fetch manifest @typescript-eslint/parser@^8.0.0 || ^8.0.0-alpha.0
41 http fetch GET 200 https://registry.npmjs.org/@typescript-eslint%2fparser 108ms (cache revalidated)
42 silly fetch manifest eslint@^9.11.1
43 http fetch GET 200 https://registry.npmjs.org/eslint 6ms (cache hit)
44 silly fetch manifest jiti@*
45 http fetch GET 200 https://registry.npmjs.org/jiti 2ms (cache hit)
46 silly placeDep ROOT @typescript-eslint/eslint-plugin@8.7.0 REPLACE for: deep@0.1.0 want: ^8.7.0
47 silly placeDep ROOT @typescript-eslint/parser@8.7.0 OK for: @typescript-eslint/eslint-plugin@8.7.0 want: ^8.0.0 || ^8.0.0-alpha.0
48 silly fetch manifest ts-api-utils@^1.3.0
49 silly fetch manifest @typescript-eslint/utils@8.7.0
50 silly fetch manifest @typescript-eslint/type-utils@8.7.0
51 silly fetch manifest @typescript-eslint/visitor-keys@8.7.0
52 silly fetch manifest @typescript-eslint/scope-manager@8.7.0
53 silly fetch manifest @typescript-eslint/types@8.7.0
54 silly fetch manifest @typescript-eslint/typescript-estree@8.7.0
55 http fetch GET 200 https://registry.npmjs.org/@typescript-eslint%2ftype-utils 11ms (cache hit)
56 http fetch GET 200 https://registry.npmjs.org/@typescript-eslint%2futils 23ms (cache hit)
57 http fetch GET 200 https://registry.npmjs.org/@typescript-eslint%2fscope-manager 78ms (cache revalidated)
58 http fetch GET 200 https://registry.npmjs.org/ts-api-utils 110ms (cache revalidated)
59 http fetch GET 200 https://registry.npmjs.org/@typescript-eslint%2fvisitor-keys 143ms (cache revalidated)
60 http fetch GET 200 https://registry.npmjs.org/@typescript-eslint%2ftypescript-estree 164ms (cache revalidated)
61 http fetch GET 200 https://registry.npmjs.org/@typescript-eslint%2ftypes 186ms (cache revalidated)
62 timing idealTree:#root Completed in 601ms
63 silly fetch manifest typescript@>=4.2.0
64 http fetch GET 200 https://registry.npmjs.org/typescript 51ms (cache revalidated)
65 silly fetch manifest eslint@^8.57.0 || ^9.0.0
66 silly placeDep ROOT @typescript-eslint/scope-manager@8.7.0 OK for: @typescript-eslint/eslint-plugin@8.7.0 want: 8.7.0
67 silly placeDep ROOT @typescript-eslint/type-utils@8.7.0 OK for: @typescript-eslint/eslint-plugin@8.7.0 want: 8.7.0
68 silly placeDep ROOT @typescript-eslint/utils@8.7.0 OK for: @typescript-eslint/eslint-plugin@8.7.0 want: 8.7.0
69 silly placeDep ROOT @typescript-eslint/visitor-keys@8.7.0 OK for: @typescript-eslint/eslint-plugin@8.7.0 want: 8.7.0
70 silly placeDep ROOT ts-api-utils@1.3.0 OK for: @typescript-eslint/eslint-plugin@8.7.0 want: ^1.3.0
71 timing idealTree:node_modules/@typescript-eslint/eslint-plugin Completed in 79ms
72 silly placeDep ROOT @typescript-eslint/types@8.7.0 OK for: @typescript-eslint/parser@8.7.0 want: 8.7.0
73 silly placeDep ROOT @typescript-eslint/typescript-estree@8.7.0 OK for: @typescript-eslint/parser@8.7.0 want: 8.7.0
74 silly fetch manifest semver@^7.6.0
75 silly fetch manifest minimatch@^9.0.4
76 http fetch GET 200 https://registry.npmjs.org/semver 41ms (cache revalidated)
77 http fetch GET 200 https://registry.npmjs.org/minimatch 53ms (cache revalidated)
78 timing idealTree:node_modules/@typescript-eslint/parser Completed in 56ms
79 timing idealTree:node_modules/@typescript-eslint/scope-manager Completed in 0ms
80 timing idealTree:node_modules/@typescript-eslint/type-utils Completed in 0ms
81 timing idealTree:node_modules/@typescript-eslint/types Completed in 0ms
82 silly placeDep node_modules/@typescript-eslint/typescript-estree minimatch@9.0.5 OK for: @typescript-eslint/typescript-estree@8.7.0 want: ^9.0.4
83 silly fetch manifest brace-expansion@^2.0.1
84 silly placeDep node_modules/@typescript-eslint/typescript-estree semver@7.6.3 OK for: @typescript-eslint/typescript-estree@8.7.0 want: ^7.6.0
85 http fetch GET 200 https://registry.npmjs.org/brace-expansion 68ms (cache revalidated)
86 timing idealTree:node_modules/@typescript-eslint/typescript-estree Completed in 69ms
87 timing idealTree:node_modules/@typescript-eslint/utils Completed in 0ms
88 timing idealTree:node_modules/@typescript-eslint/visitor-keys Completed in 0ms
89 silly fetch manifest eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0
90 timing idealTree Completed in 938ms
91 timing command:install Completed in 945ms
92 verbose stack Error: could not resolve
92 verbose stack at PlaceDep.failPeerConflict (/Users/valentinhuber/.nvm/versions/node/v21.6.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:503:25)
92 verbose stack at new PlaceDep (/Users/valentinhuber/.nvm/versions/node/v21.6.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:157:21)
92 verbose stack at #buildDepStep (/Users/valentinhuber/.nvm/versions/node/v21.6.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:933:18)
92 verbose stack at async Arborist.buildIdealTree (/Users/valentinhuber/.nvm/versions/node/v21.6.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:196:7)
92 verbose stack at async Promise.all (index 1)
92 verbose stack at async Arborist.reify (/Users/valentinhuber/.nvm/versions/node/v21.6.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:159:5)
92 verbose stack at async Install.exec (/Users/valentinhuber/.nvm/versions/node/v21.6.1/lib/node_modules/npm/lib/commands/install.js:152:5)
92 verbose stack at async module.exports (/Users/valentinhuber/.nvm/versions/node/v21.6.1/lib/node_modules/npm/lib/cli-entry.js:61:5)
93 verbose cwd /Users/valentinhuber/GitHub/deep
94 verbose Darwin 23.6.0
95 verbose node v21.6.1
96 verbose npm v10.2.4
97 error code ERESOLVE
98 error ERESOLVE could not resolve
99 error
100 error While resolving: eslint-plugin-react-hooks@4.6.2
100 error Found: eslint@9.11.1
100 error node_modules/eslint
100 error eslint@"^9.11.1" from the root project
100 error peer eslint@"^6.0.0 || ^7.0.0 || >=8.0.0" from @eslint-community/eslint-utils@4.4.0
100 error node_modules/@eslint-community/eslint-utils
100 error @eslint-community/eslint-utils@"^4.2.0" from eslint@9.11.1
100 error @eslint-community/eslint-utils@"^4.4.0" from @typescript-eslint/utils@8.7.0
100 error node_modules/@typescript-eslint/utils
100 error @typescript-eslint/utils@"8.7.0" from @typescript-eslint/eslint-plugin@8.7.0
100 error node_modules/@typescript-eslint/eslint-plugin
100 error @typescript-eslint/eslint-plugin@"^8.7.0" from the root project
100 error 1 more (@typescript-eslint/type-utils)
100 error 6 more (eslint-plugin-jsx-a11y, eslint-plugin-react, ...)
100 error
100 error Could not resolve dependency:
100 error peer eslint@"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" from eslint-plugin-react-hooks@4.6.2
100 error node_modules/eslint-plugin-react-hooks
100 error eslint-plugin-react-hooks@"^4.6.2" from the root project
100 error
100 error Conflicting peer dependency: eslint@8.57.1
100 error node_modules/eslint
100 error peer eslint@"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" from eslint-plugin-react-hooks@4.6.2
100 error node_modules/eslint-plugin-react-hooks
100 error eslint-plugin-react-hooks@"^4.6.2" from the root project
100 error
100 error Fix the upstream dependency conflict, or retry
100 error this command with --force or --legacy-peer-deps
100 error to accept an incorrect (and potentially broken) dependency resolution.
101 error
101 error
101 error For a full report see:
101 error /Users/valentinhuber/.npm/_logs/2024-09-25T16_49_26_569Z-eresolve-report.txt
102 verbose exit 1
103 timing npm Completed in 1031ms
104 verbose unfinished npm timer reify 1727282966654
105 verbose unfinished npm timer reify:loadTrees 1727282966659
106 verbose unfinished npm timer idealTree:buildDeps 1727282966783
107 verbose unfinished npm timer idealTree:node_modules/eslint-plugin-react-hooks 1727282967588
108 verbose code 1
109 error A complete log of this run can be found in: /Users/valentinhuber/.npm/_logs/2024-09-25T16_49_26_569Z-debug-0.log
Yes, hard to tell what went wrong.
You might consider ncu --peer
to enforce peerDependencies. It is opt-in because it involves additional HTTP requests that may significantly slow down the command. If you have packages like eslint plugins that have a lot of peer dependencies it can be helpful though.
Oh, that's awesome, thanks!
Again: I fixed my issues manually in the end, take as much from this error log as you want and then close the issue. I don't need any more support.