Skip to content

Peer dependency error #56106

@miguel5612

Description

@miguel5612

Which @angular/* package(s) are the source of the bug?

common

Is this a regression?

Yes

Description

{
"version": "17.3.3",
"license": "",
"scripts": {
"ng": "ng",
"start": "ng serve -c=development",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"sonar": "sonar-scanner",
"prett": "prettier --write '**/*.html'",
"upd": "ng update @angular/core @angular/cli",
"updB": "ng update @angular-devkit/build-angular"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.3.3",
"@angular/cdk": "^17.3.3",
"@angular/compiler": "^17.3.3",
"@angular/core": "^17.3.3",
"@angular/forms": "^17.3.3",
"@angular/localize": "^17.3.3",
"@angular/material": "^17.3.3",
"@angular/platform-browser": "^17.3.3",
"@angular/platform-browser-dynamic": "^17.3.3",
"@angular/router": "^17.3.3",
"@ng-bootstrap/ng-bootstrap": "^16.0.0",
"@ng-select/ng-select": "^12.0.6",
"@ngx-translate/core": "11.0.1",
"@ngx-translate/http-loader": "4.0.0",
"@popperjs/core": "^2.11.8",
"angular-slick-carousel": "^3.1.7",
"bootstrap": "^5.3.2",
"chart.js": "^3.4.0",
"classlist.js": "1.1.20150312",
"date-fns": "1.30.1",
"encrypt-storage": "^2.12.22",
"exceljs": "^4.4.0",
"file-saver": "^2.0.5",
"hammerjs": "^2.0.8",
"html2canvas": "^1.4.1",
"intl": "1.2.5",
"jquery": "^3.7.1",
"jspdf": "^2.5.1",
"jwt-decode": "^3.1.2",
"ng-angular8-datatable": "^0.9.11",
"ng-multiselect-dropdown": "^1.0.0",
"ng2-charts": "^5.0.4",
"ng2-search-filter": "^0.5.1",
"ng2-select": "^2.0.0",
"ngx-mask": "^17.0.7",
"node-sass": "~9.0.0",
"primeicons": "^6.0.1",
"primeng": "^17.4.0",
"prismjs": "^1.29.0",
"resize-observer-polyfill": "1.5.1",
"rxjs": "^6.6.7",
"screenfull": "6.0.2",
"slick-carousel": "^1.8.1",
"sweetalert": "^2.1.2",
"sweetalert2": "^11.10.7",
"tslib": "^2.6.2",
"web-animations-js": "^2.3.2",
"xlsx": "^0.18.5",
"xlsx-js-style": "^1.2.0",
"zone.js": "^0.14.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.3.3",
"@angular/cli": "^17.3.3",
"@angular/compiler-cli": "^17.3.3",
"@angular/language-service": "^17.3.3",
"@types/c3": "^0.6.4",
"@types/chartist": "^0.9.48",
"@types/datatables.net": "^1.10.28",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "^2.0.13",
"@types/jquery": "^3.5.29",
"@types/node": "^20.12.6",
"eslint": "^9.0.0",
"prettier": "3.1",
"ts-node": "~5.0.1",
"tslint": "~6.1.0",
"typescript": "~5.3.3"
}
}

Please provide a link to a minimal reproduction of the bug

npm i

Please provide the exception or error you saw

0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
1 info using npm@10.5.2
2 info using node@v20.13.1
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:C:\Users\Desktop\.npmrc Completed in 1ms
10 timing config:load:project Completed in 3ms
11 timing config:load:file:C:\Users\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\AppData\Roaming\npm\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 2ms
19 timing npm:load:mkdirpcache Completed in 1ms
20 timing npm:load:mkdirplogs Completed in 0ms
21 verbose title npm i
22 verbose argv "i"
23 timing npm:load:setTitle Completed in 1ms
24 timing npm:load:display Completed in 0ms
25 verbose logfile logs-max:10 dir:C:\Users\AppData\Local\npm-cache\_logs\2024-05-27T19_09_08_462Z-
26 verbose logfile C:\Users\AppData\Local\npm-cache\_logs\2024-05-27T19_09_08_462Z-debug-0.log
27 timing npm:load:logFile Completed in 3ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 35ms
31 timing arborist:ctor Completed in 1ms
32 silly logfile start cleaning logs, removing 2 files
33 silly logfile done cleaning log files
34 timing idealTree:init Completed in 481ms
35 timing idealTree:userRequests Completed in 1ms
36 silly idealTree buildDeps
37 timing idealTree:#root Completed in 1ms
38 silly fetch manifest @angular/common@^17.0.0 || ^18.0.0
39 http fetch GET 200 https://registry.npmjs.org/@angular%2fcommon 1604ms (cache revalidated)
40 silly fetch manifest @angular/core@^17.0.0 || ^18.0.0
41 http fetch GET 200 https://registry.npmjs.org/@angular%2fcore 118ms (cache revalidated)
42 silly fetch manifest rxjs@^6.5.3 || ^7.4.0
43 http fetch GET 200 https://registry.npmjs.org/rxjs 86ms (cache revalidated)
44 silly fetch manifest zone.js@~0.14.0
45 http fetch GET 200 https://registry.npmjs.org/zone.js 92ms (cache revalidated)
46 timing idealTree Completed in 2434ms
47 timing command:i Completed in 2441ms
48 verbose stack Error: could not resolve
48 verbose stack     at PlaceDep.failPeerConflict (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:503:25)
48 verbose stack     at new PlaceDep (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:157:21)
48 verbose stack     at #buildDepStep (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:940:18)
48 verbose stack     at async Arborist.buildIdealTree (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:203:7)
48 verbose stack     at async Promise.all (index 1)
48 verbose stack     at async Arborist.reify (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:154:5)
48 verbose stack     at async Install.exec (C:\Program Files\nodejs\node_modules\npm\lib\commands\install.js:153:5)
48 verbose stack     at async module.exports (C:\Program Files\nodejs\node_modules\npm\lib\cli-entry.js:61:5)
49 verbose cwd C:\Users
50 verbose Windows_NT 10.0.22631
51 verbose node v20.13.1
52 verbose npm  v10.5.2
53 error code ERESOLVE
54 error ERESOLVE could not resolve
55 error
56 error While resolving: �[1m@angular/cdk�[22m@�[1m17.3.10�[22m
56 error Found: �[1m@angular/core�[22m@�[1m17.3.10�[22m�[2m�[22m
56 error �[2mnode_modules/@angular/core�[22m
56 error   �[1m@angular/core�[22m@"�[1m^17.3.3�[22m" from the root project
56 error   �[35mpeer�[39m �[1m@angular/core�[22m@"�[1m17.3.10�[22m" from �[1m@angular/animations�[22m@�[1m17.3.10�[22m�[2m�[22m
56 error   �[2mnode_modules/@angular/animations�[22m
56 error     �[1m@angular/animations�[22m@"�[1m^17.3.3�[22m" from the root project
56 error     �[35mpeer�[39m �[1m@angular/animations�[22m@"�[1m^17.0.0 || ^18.0.0�[22m" from �[1m@angular/material�[22m@�[1m17.3.10�[22m�[2m�[22m
56 error     �[2mnode_modules/@angular/material�[22m
56 error       �[1m@angular/material�[22m@"�[1m^17.3.3�[22m" from the root project
56 error     1 more (@angular/platform-browser)
56 error   14 more (@angular/cdk, @angular/compiler, @angular/forms, ...)
56 error
56 error Could not resolve dependency:
56 error �[35mpeer�[39m �[1m@angular/common�[22m@"�[1m^17.0.0 || ^18.0.0�[22m" from �[1m@angular/cdk�[22m@�[1m17.3.10�[22m�[2m�[22m
56 error �[2mnode_modules/@angular/cdk�[22m
56 error   �[1m@angular/cdk�[22m@"�[1m^17.3.3�[22m" from the root project
56 error   �[35mpeer�[39m �[1m@angular/cdk�[22m@"�[1m17.3.10�[22m" from �[1m@angular/material�[22m@�[1m17.3.10�[22m�[2m�[22m
56 error   �[2mnode_modules/@angular/material�[22m
56 error     �[1m@angular/material�[22m@"�[1m^17.3.3�[22m" from the root project
56 error   1 more (ng2-charts)
56 error
56 error Conflicting peer dependency: �[1m@angular/core�[22m@�[1m18.0.0�[22m�[2m�[22m
56 error �[2mnode_modules/@angular/core�[22m
56 error   �[35mpeer�[39m �[1m@angular/core�[22m@"�[1m18.0.0�[22m" from �[1m@angular/common�[22m@�[1m18.0.0�[22m�[2m�[22m
56 error   �[2mnode_modules/@angular/common�[22m
56 error     �[35mpeer�[39m �[1m@angular/common�[22m@"�[1m^17.0.0 || ^18.0.0�[22m" from �[1m@angular/cdk�[22m@�[1m17.3.10�[22m�[2m�[22m
56 error     �[2mnode_modules/@angular/cdk�[22m
56 error       �[1m@angular/cdk�[22m@"�[1m^17.3.3�[22m" from the root project
56 error       2 more (@angular/material, ng2-charts)
56 error
56 error Fix the upstream dependency conflict, or retry
56 error this command with --force or --legacy-peer-deps
56 error to accept an incorrect (and potentially broken) dependency resolution.
57 error
57 error
57 error For a full report see:
57 error C:\Users\AppData\Local\npm-cache\_logs\2024-05-27T19_09_08_462Z-eresolve-report.txt
58 verbose exit 1
59 timing npm Completed in 3016ms
60 verbose unfinished npm timer reify 1716836949027
61 verbose unfinished npm timer reify:loadTrees 1716836949030
62 verbose unfinished npm timer idealTree:buildDeps 1716836949513
63 verbose unfinished npm timer idealTree:node_modules/@angular/cdk 1716836949514
64 verbose code 1
65 error A complete log of this run can be found in: C:\Users\AppData\Local\npm-cache\_logs\2024-05-27T19_09_08_462Z-debug-0.log

Please provide the environment you discovered this bug in (run ng version)

Angular 17.3.3

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions