这错误出现当我尝试到安装任何backage与npm
尝试清除缓存并自行重新安装节点,但没有任何效果
- -错误信息
D:\Electrolux KB\Electrolux-KnowledgeBase.eg_v2>npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: electrolux-knowledge-base.eg-v2@0.0.0
npm ERR! Found: @angular/common@15.0.4
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@"^15.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^14.1.0" from @ng-bootstrap/ng-bootstrap@13.1.1
npm ERR! node_modules/@ng-bootstrap/ng-bootstrap
npm ERR! @ng-bootstrap/ng-bootstrap@"^13.0.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!
npm ERR! For a full report see:
npm ERR! C:\Users\Dell\AppData\Local\npm-cache\_logs\2023-01-01T14_04_55_722Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Dell\AppData\Local\npm-cache\_logs\2023-01-01T14_04_55_722Z-debug-0.log
- -2023年01月01日T14_04_55_722Z-电子解析-报告. txt数据
'Log files:
C:\Users\Dell\AppData\Local\npm-cache\_logs\2023-01-01T14_04_55_722Z-debug-0.log
# npm resolution error report
While resolving: electrolux-knowledge-base.eg-v2@0.0.0
Found: @angular/common@15.0.4
node_modules/@angular/common
@angular/common@"^15.0.3" from the root project
Could not resolve dependency:
peer @angular/common@"^14.1.0" from @ng-bootstrap/ng-bootstrap@13.1.1
node_modules/@ng-bootstrap/ng-bootstrap
@ng-bootstrap/ng-bootstrap@"^13.0.0" from the root project
Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
- -2023 - 01 - 01T14_04_55_722Z-调试-0.日志数据
0 verbose cli C:\Program Files\nodejs\node.exe C:\Users\Dell\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
1 info using npm@9.2.0
2 info using node@v18.12.1
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:C:\Users\Dell\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 3ms
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:D:\Electrolux KB\Electrolux-KnowledgeBase.eg_v2\.npmrc Completed in 0ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:C:\Users\Dell\.npmrc Completed in 0ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:C:\Users\Dell\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:setEnvs Completed in 2ms
16 timing config:load Completed in 13ms
17 timing npm:load:configload Completed in 13ms
18 timing npm:load:mkdirpcache Completed in 0ms
19 timing npm:load:mkdirplogs Completed in 1ms
20 verbose title npm install
21 verbose argv "install"
22 timing npm:load:setTitle Completed in 2ms
23 timing config:load:flatten Completed in 5ms
24 timing npm:load:display Completed in 6ms
25 verbose logfile logs-max:10 dir:C:\Users\Dell\AppData\Local\npm-cache\_logs\2023-01-01T14_04_55_722Z-
26 verbose logfile C:\Users\Dell\AppData\Local\npm-cache\_logs\2023-01-01T14_04_55_722Z-debug-0.log
27 timing npm:load:logFile Completed in 12ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 35ms
31 silly logfile start cleaning logs, removing 2 files
32 timing config:load:flatten Completed in 1ms
33 timing arborist:ctor Completed in 1ms
34 silly logfile done cleaning log files
35 timing arborist:ctor Completed in 0ms
36 timing idealTree:init Completed in 20ms
37 timing idealTree:userRequests Completed in 0ms
38 silly idealTree buildDeps
39 silly fetch manifest @angular/animations@^15.0.3
40 http fetch GET 200 https://registry.npmjs.org/@angular%2fanimations 6168ms (cache miss)
41 silly fetch manifest @angular/core@^15.0.3
42 http fetch GET 200 https://registry.npmjs.org/@angular%2fcore 2837ms (cache miss)
43 silly fetch manifest rxjs@~7.5.0
44 http fetch GET 200 https://registry.npmjs.org/rxjs 924ms (cache miss)
45 silly fetch manifest zone.js@~0.11.4
46 http fetch GET 200 https://registry.npmjs.org/zone.js 421ms (cache miss)
47 silly fetch manifest @angular/common@^15.0.3
48 http fetch GET 200 https://registry.npmjs.org/@angular%2fcommon 1528ms (cache miss)
49 silly fetch manifest @angular/compiler@^15.0.3
50 http fetch GET 200 https://registry.npmjs.org/@angular%2fcompiler 2464ms (cache miss)
51 silly fetch manifest @angular/forms@^15.0.3
52 http fetch GET 200 https://registry.npmjs.org/@angular%2fforms 1442ms (cache miss)
53 silly fetch manifest @angular/platform-browser@^15.0.3
54 http fetch GET 200 https://registry.npmjs.org/@angular%2fplatform-browser 1380ms (cache miss)
55 silly fetch manifest @angular/localize@^15.0.3
56 http fetch GET 200 https://registry.npmjs.org/@angular%2flocalize 4636ms (cache miss)
57 silly fetch manifest @angular/compiler-cli@^15.0.3
58 http fetch GET 200 https://registry.npmjs.org/@angular%2fcompiler-cli 1340ms (cache miss)
59 silly fetch manifest typescript@~4.8.4
60 http fetch GET 200 https://registry.npmjs.org/typescript 25078ms (cache miss)
61 silly fetch manifest @angular/platform-browser-dynamic@^15.0.3
62 http fetch GET 200 https://registry.npmjs.org/@angular%2fplatform-browser-dynamic 3859ms (cache miss)
63 silly fetch manifest @angular/router@^15.0.3
64 http fetch GET 200 https://registry.npmjs.org/@angular%2frouter 3342ms (cache miss)
65 silly fetch manifest @fortawesome/fontawesome-free@^6.1.2
66 http fetch GET 200 https://registry.npmjs.org/@fortawesome%2ffontawesome-free 949ms (cache miss)
67 silly fetch manifest @ng-bootstrap/ng-bootstrap@^13.0.0
68 http fetch GET 200 https://registry.npmjs.org/@ng-bootstrap%2fng-bootstrap 3814ms (cache miss)
69 silly fetch manifest @angular/common@^14.1.0
70 timing idealTree Completed in 60494ms
71 timing command:install Completed in 60503ms
72 verbose stack Error: unable to resolve dependency tree
72 verbose stack at [failPeerConflict] (C:\Users\Dell\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1378:25)
72 verbose stack at [loadPeerSet] (C:\Users\Dell\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1344:34)
72 verbose stack at async [buildDepStep] (C:\Users\Dell\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:928:11)
72 verbose stack at async Arborist.buildIdealTree (C:\Users\Dell\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:206:7)
72 verbose stack at async Promise.all (index 1)
72 verbose stack at async Arborist.reify (C:\Users\Dell\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:156:5)
72 verbose stack at async Install.exec (C:\Users\Dell\AppData\Roaming\npm\node_modules\npm\lib\commands\install.js:146:5)
72 verbose stack at async module.exports (C:\Users\Dell\AppData\Roaming\npm\node_modules\npm\lib\cli.js:133:5)
73 verbose cwd D:\Electrolux KB\Electrolux-KnowledgeBase.eg_v2
74 verbose Windows_NT 10.0.16299
75 verbose node v18.12.1
76 verbose npm v9.2.0
77 error code ERESOLVE
78 error ERESOLVE unable to resolve dependency tree
79 error
80 error While resolving: [1melectrolux-knowledge-base.eg-v2[22m@[1m0.0.0[22m
80 error Found: [1m@angular/common[22m@[1m15.0.4[22m[2m[22m
80 error [2mnode_modules/@angular/common[22m
80 error [1m@angular/common[22m@"[1m^15.0.3[22m" from the root project
80 error
80 error Could not resolve dependency:
80 error [35mpeer[39m [1m@angular/common[22m@"[1m^14.1.0[22m" from [1m@ng-bootstrap/ng-bootstrap[22m@[1m13.1.1[22m[2m[22m
80 error [2mnode_modules/@ng-bootstrap/ng-bootstrap[22m
80 error [1m@ng-bootstrap/ng-bootstrap[22m@"[1m^13.0.0[22m" from the root project
80 error
80 error Fix the upstream dependency conflict, or retry
80 error this command with --force or --legacy-peer-deps
80 error to accept an incorrect (and potentially broken) dependency resolution.
81 error
81 error
81 error For a full report see:
81 error C:\Users\Dell\AppData\Local\npm-cache\_logs\2023-01-01T14_04_55_722Z-eresolve-report.txt
82 verbose exit 1
83 timing npm Completed in 60597ms
84 verbose unfinished npm timer reify 1672581895796
85 verbose unfinished npm timer reify:loadTrees 1672581895798
86 verbose unfinished npm timer idealTree:buildDeps 1672581895821
87 verbose unfinished npm timer idealTree:#root 1672581895822
88 verbose code 1
89 error A complete log of this run can be found in:
89 error C:\Users\Dell\AppData\Local\npm-cache\_logs\2023-01-01T14_04_55_722Z-debug-0.log
- -软件包. json数据
{
"name": "electrolux-knowledge-base.eg-v2",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"@angular/animations": "^15.0.3",
"@angular/common": "^15.0.3",
"@angular/compiler": "^15.0.3",
"@angular/core": "^15.0.3",
"@angular/forms": "^15.0.3",
"@angular/localize": "^15.0.3",
"@angular/platform-browser": "^15.0.3",
"@angular/platform-browser-dynamic": "^15.0.3",
"@angular/router": "^15.0.3",
"@fortawesome/fontawesome-free": "^6.1.2",
"@ng-bootstrap/ng-bootstrap": "^13.0.0",
"@popperjs/core": "^2.10.2",
"bootstrap": "^5.2.0",
"chart.js": "^3.8.0",
"jquery": "^3.6.1",
"ngx-cookie-service": "^14.0.1",
"ngx-typed-js": "^2.1.1",
"rxjs": "~7.5.0",
"tslib": "^2.4.1",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^15.0.3",
"@angular/cli": "^15.0.3",
"@angular/compiler-cli": "^15.0.3",
"@types/jasmine": "~4.0.0",
"jasmine-core": "~4.1.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~4.8.4"
}
}
我尝试了这些解决方案
- 删除软件包-lock.json。
- 删除节点模块
- 运行npm缓存清理--强制
- 运行npm安装。
并尝试重新安装节点
1条答案
按热度按时间hgqdbh6s1#
使用命令尝试