问题
Hi I've tried to uninstall global @angular/cli but I still can use ng -v and it reports warning: Your global Angular CLI version (1.7.0) is greater than your local
I tried:
npm uninstall -g angular-cli
npm uninstall -g @angular/cli
npm cache verify
But ng -v still report the warning that my global is greater than local. Please help. Thank you in advance!
回答1:
Use this command to uninstall the angular-cli ,it will update the dependencies and also do try to clear the cache once.
npm uninstall --save-dev angular-cli
回答2:
Try the Following steps to uninstall angular cli completely
npm uninstall -g angular-cli // Use sudo before to give administrator permission
npm uninstall -g @angular/cli // Use sudo before to give administrator permission
npm cache clean
or npm cache clean --force
To reinstall the latest version try this
npm install -g @angular/cli@latest
来源:https://stackoverflow.com/questions/49205088/global-uninstall-angular-cli