我正在尝试安装此组件npm install ngx-treeview --保存,但没有得到

dwthyt8l  于 2023-03-08  发布在  其他
关注(0)|答案(1)|浏览(88)

我正在尝试安装此组件:npm install ngx-treeview --save,我遇到了这个错误:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: angular-ngx-treeview-app@0.0.0
npm ERR! Found: @angular/common@15.2.1
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"15.2.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^10.0.0" from ngx-treeview@10.0.2
npm ERR! node_modules/ngx-treeview
npm ERR!   ngx-treeview@"*" 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\Jeferson\AppData\Local\npm-cache\_logs\2023-03-03T14_36_52_656Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Jeferson\AppData\Local\npm-cache\_logs\2023-03-03T14_36_52_656Z-debug-0.log

npm i @angular/common
vhmi4jdf

vhmi4jdf1#

最后使用--legacy-peer-deps,就像npm安装ngx-treeview一样,它会工作的。

相关问题