0

i have angular version 15.0.3. when i trying to install ngx-spinner with command npm install ngx-spinner, I getting an error

  sashamaksyutenko@MacBook-Pro Client % npm install ngx-spinner
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: client@0.0.0
npm ERR! Found: @angular/common@15.0.4
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^15.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^14.0.0" from ngx-spinner@14.0.0
npm ERR! node_modules/ngx-spinner
npm ERR!   ngx-spinner@"*" 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 /Users/sashamaksyutenko/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/sashamaksyutenko/.npm/_logs/2022-12-21T11_40_00_054Z-debug-0.log
sashamaksyutenko@MacBook-Pro Client % 
Sasha87
  • 1
  • 6

2 Answers2

0

As you can see from the error messages, there are conflicts in upstream dependencies due to version compatibilities. You can still try to install the package by appending one of the suggested commands. If you decide to do so, I would advise you to choose "--legacy-peer-deps" and not "--force". With "--force" you may get strange unexpected results.

npm install ngx-spinner --legacy-peer-deps
omostan
  • 840
  • 8
  • 9
  • I installed spinner with force. What about styles? Earlier I pasted screenshots. How to make the same placement of the buttons and inputs on the right side? – Sasha87 Dec 27 '22 at 19:49
0

it also gave me the same error, so I uninstalled spinner with the command npm uninstall ngx-spinner and forced to install it again as follows npm install ngx-spinner --force

Hope this can help you.

JTENORIOH
  • 41
  • 3