Angular 2/Angular 4 installation troubleshooting

Angular 2/Angular 4 installation troubleshooting

#1 Getting errors while npm angular cli installation ? just be sure that you typed the exact command npm install -g @angular/cli , a lot of people forget the "@" or they miss \cli with /cli.

#2 Always be sure to download the latest NodeJS from it's site and to be the current and not the lts version, or update it using npm install -g npm.

#3 In Linux be sure you are root or use sudo before running the command.

#4 If you need to update the angular cli you can run below commands:
[sudo] npm uninstall -g angular-cli @angular/cli

#5 Path error:

'ng' is not recognized as an internal or external command, operable program or batch file.

Go to Windows > Start and search and run 'env' , then add the following inside the path at the end of the line while replacing user-name with your Windows user.


Don't forget to restart the cmd so the new environments take place.