angular cli : ng commands shows Invalid character error

Viewed 1253

I tried to find the version of angular cli after successful installation but it shows a Window Script Host model pop up with an error.

Installation: enter image description here

Windows Script Host appears after I tried with

ng version
3 Answers

Remove this path in environment variables

C:\Users\{user}\AppData\Roaming\npm\node_modules\@angular\cli\bin

Then add this path to environment variables if you have not already

 C:\Users\{user}\AppData\Roaming\npm

For anyone else running into this same issue, I had to delete the system environment variable for the Angular CLI and then restart my console window.

C:\Users\{user}\AppData\Roaming\npm\node_modules\@angular\cli\bin

Remove the user environment variable

C:\Users\satsi\AppData\Roaming\npm\node_modules@angular\cli\bin
Related