First of all, check if your npm and node installed properly
with commands npm version
and node -v
.
If they are proper:
Find the root global Directory of NPM npm root -g
(it will
give you root of your global npm store)
Uninstall old angular cli with npm uninstall -g angular-cli
and npm cache clean
Reinstall new Version of angular npm install -g @angular/cli@latest
make an Alias of Name ng:
alias ng="C:/ProgramData/npm/node_modules/@angular/cli/bin/ng"
alias ng="<ath-to-your-global-node-modules>/<angular cli path till ng>"
(from answered Oct 20 '16 at 15:30 @m.zemlyanoi )
then to check you can type ng -v