0

my Angular Version: enter image description here

npm install doesn't solve a thing, my npm verson is 7.12.0

I tried to run npm install @kolkov/ngx-gallery --save to install ngx-gallery and it gives me the following errors



npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: tesisclient@0.0.0
npm ERR! Found: tslib@2.3.0
npm ERR! node_modules/tslib
npm ERR!   tslib@"^2.0.0" from the root project
npm ERR!   tslib@"^2.0.0" from @angular/common@10.1.6
npm ERR!   node_modules/@angular/common
npm ERR!     @angular/common@"~10.1.4" from the root project
npm ERR!     peer @angular/common@">=8.0.0" from @kolkov/ngx-gallery@1.2.3
npm ERR!     node_modules/@kolkov/ngx-gallery
npm ERR!       @kolkov/ngx-gallery@"*" from the root project
npm ERR!   1 more (@angular/core)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer tslib@"^1.9.3" from @kolkov/ngx-gallery@1.2.3
npm ERR! node_modules/@kolkov/ngx-gallery
npm ERR!   @kolkov/ngx-gallery@"*" 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\Armando\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\Armando\AppData\Local\npm-cache\_logs\2021-07-24T20_05_07_708Z-debug.log



armando t
  • 131
  • 1
  • 4
  • 13

3 Answers3

1

install by below command

npm install @kolkov/ngx-gallery --force

see in below Github reference link. https://github.com/kolkov/ngx-gallery/issues/77

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Ansh
  • 51
  • 5
0

This can have many reasons, i would suggest updating Node.js to the latest version which is currently 14.17.3.

If problem persist, run this command

npm install --save --legacy-peer-deps
Mohamed Karkotly
  • 1,364
  • 3
  • 13
  • 26
  • I update npm to 14.17.3 and run the same command with --legacy-peer-deps and that broke my project it doesn't compile anymore, fortunately I can recover it with git but that didn't solve the problem – armando t Jul 25 '21 at 14:44
0
npm config set legacy-peer-deps true

if this one not work you can refer these document and try these commands https://www.codegrepper.com/code-examples/whatever/npm+ERR%21+code+ERESOLVE+npm+ERR%21+ERESOLVE+unable+to+resolve+dependency+tree