Cannot install angular fancy grid via npm

huangapple go评论59阅读模式
英文:

Cannot install angular fancy grid via npm

问题

I am following the instructions to install angular fancy grid using npm but there is an error.

I have tried this

npm install --save fancygrid fancy-grid-angular

and errors appear

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: front-end@0.0.0
npm ERR! Found: @angular/common@15.2.9
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@^15.2.0 from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@^6.0.0-rc.0 || ^6.0.0 from fancy-grid-angular@0.0.7
npm ERR! node_modules/fancy-grid-angular
npm ERR!   fancy-grid-angular@* 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! See C:\Users\user\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Local\npm-cache\_logs23-05-17T04_37_31_724Z-debug-0.log

Documentation: fancy grid

英文:

I am following the instructions to install angular fancy grid using npm but there is an error.

I have tried this

npm install --save fancygrid fancy-grid-angular

and errors appear

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: front-end@0.0.0
npm ERR! Found: @angular/common@15.2.9
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^15.2.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^6.0.0-rc.0 || ^6.0.0" from fancy-grid-angular@0.0.7
npm ERR! node_modules/fancy-grid-angular
npm ERR!   fancy-grid-angular@"*" 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! See C:\Users\user\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Local\npm-cache\_logs23-05-17T04_37_31_724Z-debug-0.log

Documentation: fancy grid

答案1

得分: 1

这是由于存在依赖冲突。可能您的依赖项与较旧版本的Angular兼容,就像它所说的那样,它正在使用@angular/common@^6.0.0,但您的版本是@angular/common@^15.2.0。您可以尝试降级,但最好按照它建议的方式尝试--legacy-peer-deps

npm install --legacy-peer-deps

英文:

it's because you have dependency conflict. probably your dependency is compatible with lower version of angular. like it said it is using @angular/common@"^6.0.0 but yours is using @angular/common@"^15.2.0" you can try downgrading but it's better to do as it said and try --legacy-peer-deps:

> npm install --legacy-peer-deps

huangapple
  • 本文由 发表于 2023年5月17日 12:43:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/76268617.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定