0

I tried this: npm uninstall -g @angular/cli and npm uninstall -g angular-cli Got this: up to date in 0.048s I am not able to delete angular cli I need to install angular 6.2.3 and node also unable to delete it need to install node 10.11.0

Thanks

R. Richards
  • 23,283
  • 10
  • 63
  • 62
jv cd
  • 13
  • 1
  • 4

1 Answers1

1
npm uninstall -g @angular/cli (add sudo in the start if using Linux)
npm cache clean --force / npm cache verify
npm install -g @angular/cli

add @ in front of npm package to install specific package e.g npm install -g @angular/cli@7.1.0

Akshay Rajput
  • 1,760
  • 1
  • 8
  • 19
  • think works perfectly, but when I try ng -v it shows previous angular version – jv cd Dec 17 '18 at 12:44
  • I guess you are checking ng -v from inside your project, run ng -v outside your project – Akshay Rajput Dec 17 '18 at 12:51
  • I have old version npm(9.11.2) I am also trying to update it by (sudo apt install nodejs npm) ,shows 'The following packages have unmet dependencies: nodejs : Conflicts: npm E: Unable to correct problems, you have held broken packages.' – jv cd Dec 17 '18 at 13:05
  • @AkshayRajput I have the same problem and I am running ng --version from outside a project... although npm list -g --depth=0 does not show anything the ng --version command shows me that I have the cli version 8 installed.... – Gerros Aug 26 '20 at 09:41
  • It is not working on Mac. I tried it all (with sudo) and also npm verify cache --force but none work. Issuing ng -version still shows old 9+ version I had installed before. – cd491415 Feb 15 '22 at 04:12