I also stucked in the same problem. Below solution works for me.
It would be better if you upgrade your node
and npm
versions to latest. After that please follow the below steps to install the angular/cli
:
Open your command prompt with administrative privileges and uninstall angular/cli
by using npm uninstall -g angular-cli
command.
Remove node_modules
directory and then clear the cache by using npm cache clear --force
command.
Remove C:\Users\<username>\AppData\Roaming\npm\
and C:\Users\<username>\AppData\Roaming\npm-cache
.
Try to install the angular/cli@latest
by using npm install -g @angular/cli@latest
command.
Hope the above trick resolve your issue.