Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken peer dependencies #9771

Open
ramis-svitla opened this issue Jul 18, 2023 · 2 comments
Open

Broken peer dependencies #9771

ramis-svitla opened this issue Jul 18, 2023 · 2 comments
Labels

Comments

@ramis-svitla
Copy link

Describe the bug

I got breaking dependencies when I'm trying to upgrade all packages.

Steps to reproduce v1:

  • run npx npm-check-updates --interactive --format group
  • choose all packages
  • press enter
  • press 'Y'

Steps to reproduce v2:

  • run (latest version) lb4 update
  • choose 'Upgrade project dependencies'
  • press 'y' and enter to overwrite package.json file

Logs

0 verbose cli /usr/local/bin/node /usr/local/bin/npm
1 info using npm@9.8.0
2 info using node@v18.16.1
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:/home/user/train/loopback-peerdeps/.npmrc Completed in 0ms
10 timing config:load:project Completed in 3ms
11 timing config:load:file:/home/user/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/usr/local/etc/npmrc Completed in 1ms
14 timing config:load:global Completed in 1ms
15 timing config:load:setEnvs Completed in 0ms
16 timing config:load Completed in 9ms
17 timing npm:load:configload Completed in 9ms
18 timing config:load:flatten Completed in 3ms
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 1ms
24 timing npm:load:display Completed in 1ms
25 verbose logfile logs-max:10 dir:/home/user/.npm/_logs/2023-07-18T18_42_50_950Z-
26 verbose logfile /home/user/.npm/_logs/2023-07-18T18_42_50_950Z-debug-0.log
27 timing npm:load:logFile Completed in 8ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 36ms
31 timing arborist:ctor Completed in 0ms
32 silly logfile start cleaning logs, removing 2 files
33 silly logfile done cleaning log files
34 timing idealTree:init Completed in 131ms
35 timing idealTree:userRequests Completed in 0ms
36 silly idealTree buildDeps
37 silly fetch manifest @loopback/authentication@^10.1.1
38 http fetch GET 200 https://registry.npmjs.org/@loopback%2fauthentication 1207ms (cache revalidated)
39 silly fetch manifest @loopback/core@^5.1.1
40 http fetch GET 200 https://registry.npmjs.org/@loopback%2fcore 1711ms (cache revalidated)
41 silly fetch manifest @loopback/rest@^13.1.1
42 http fetch GET 200 https://registry.npmjs.org/@loopback%2frest 1084ms (cache revalidated)
43 silly fetch manifest @loopback/authorization@^0.14.1
44 http fetch GET 200 https://registry.npmjs.org/@loopback%2fauthorization 1570ms (cache revalidated)
45 silly fetch manifest @loopback/boot@^6.1.1
46 http fetch GET 200 https://registry.npmjs.org/@loopback%2fboot 99ms (cache revalidated)
47 silly fetch manifest @loopback/context@^6.1.1
48 http fetch GET 200 https://registry.npmjs.org/@loopback%2fcontext 1558ms (cache revalidated)
49 silly fetch manifest @loopback/metadata@^6.1.1
50 http fetch GET 200 https://registry.npmjs.org/@loopback%2fmetadata 115ms (cache revalidated)
51 silly fetch manifest @loopback/openapi-v3@^9.1.1
52 http fetch GET 200 https://registry.npmjs.org/@loopback%2fopenapi-v3 1059ms (cache revalidated)
53 silly fetch manifest @loopback/repository@^6.1.1
54 http fetch GET 200 https://registry.npmjs.org/@loopback%2frepository 1573ms (cache revalidated)
55 silly fetch manifest @loopback/repository-json-schema@^7.1.1
56 http fetch GET 200 https://registry.npmjs.org/@loopback%2frepository-json-schema 102ms (cache revalidated)
57 silly fetch manifest @loopback/rest-explorer@^6.1.1
58 http fetch GET 200 https://registry.npmjs.org/@loopback%2frest-explorer 1077ms (cache revalidated)
59 silly fetch manifest @loopback/security@^0.10.1
60 http fetch GET 200 https://registry.npmjs.org/@loopback%2fsecurity 1617ms (cache revalidated)
61 silly fetch manifest @loopback/service-proxy@^6.1.1
62 http fetch GET 200 https://registry.npmjs.org/@loopback%2fservice-proxy 1576ms (cache revalidated)
63 silly fetch manifest @loopback/testlab@^6.1.1
64 http fetch GET 200 https://registry.npmjs.org/@loopback%2ftestlab 1600ms (cache revalidated)
65 timing idealTree Completed in 16231ms
66 timing command:install Completed in 16237ms
67 verbose stack Error: could not resolve
67 verbose stack     at PlaceDep.failPeerConflict (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:503:25)
67 verbose stack     at new PlaceDep (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:157:21)
67 verbose stack     at #buildDepStep (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:933:18)
67 verbose stack     at async Arborist.buildIdealTree (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:196:7)
67 verbose stack     at async Promise.all (index 1)
67 verbose stack     at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:159:5)
67 verbose stack     at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:149:5)
67 verbose stack     at async module.exports (/usr/local/lib/node_modules/npm/lib/cli-entry.js:61:5)
68 verbose cwd /home/user/train/loopback-peerdeps
69 verbose Linux 6.1.38-1-MANJARO
70 verbose node v18.16.1
71 verbose npm  v9.8.0
72 error code ERESOLVE
73 error ERESOLVE could not resolve
74 error
75 error While resolving: loopback-peerdeps@1.0.0
75 error Found: @loopback/authentication@8.1.2
75 error node_modules/@loopback/authentication
75 error   @loopback/authentication@"^10.1.1" from the root project
75 error
75 error Could not resolve dependency:
75 error @loopback/authentication@"^10.1.1" from the root project
75 error
75 error Conflicting peer dependency: @loopback/core@5.1.1
75 error node_modules/@loopback/core
75 error   peer @loopback/core@"^5.0.0" from @loopback/authentication@10.1.1
75 error   node_modules/@loopback/authentication
75 error     @loopback/authentication@"^10.1.1" from the root project
75 error
75 error Fix the upstream dependency conflict, or retry
75 error this command with --force or --legacy-peer-deps
75 error to accept an incorrect (and potentially broken) dependency resolution.
76 error
76 error
76 error For a full report see:
76 error /home/user/.npm/_logs/2023-07-18T18_42_50_950Z-eresolve-report.txt
77 verbose exit 1
78 timing npm Completed in 16407ms
79 verbose unfinished npm timer reify 1689705771113
80 verbose unfinished npm timer reify:loadTrees 1689705771116
81 verbose unfinished npm timer idealTree:buildDeps 1689705771247
82 verbose unfinished npm timer idealTree:#root 1689705771247
83 verbose code 1
84 error A complete log of this run can be found in: /home/user/.npm/_logs/2023-07-18T18_42_50_950Z-debug-0.log

Additional information

No response

Reproduction

https://github.com/ramis-svitla/loopback-peerdeps

@ramis-svitla
Copy link
Author

Could it be possible reason of the issue?
image

@fidgi
Copy link

fidgi commented Aug 13, 2023

Hi,
not sure to understand why npm fails in this case since the peer dependencies declaration "^5.0.0" should allow for compatible minor or patch version above 5.0.0.
So the condition should be satisfied with version 5.1.1

This issue may be forwarded to npm team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants