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.
Windows Script Host appears after I tried with
ng version
I came across the same error and wanted to share some insights on how I resolved it.
Probable Cause-
When you try to install @angular/cli globally, there seems to be an issue with the build in ng.js file.
npm install -g @angular/cli
Resolution-
Uninstall the globally installed angular/cli
npm uninstall -g @angular/cli
Clear npm Cache -
npm cache clean --force
Install @angular/cli locally and it seems to be working fine.
npm install @angular/cli
Also, after installation make sure you add the path to your environment variable
Example- "C:\Users{user_name}\node_modules.bin
It will be installed in the path where you'll run the installation for angular/cli
Remove the user environment variable
C:\Users\satsi\AppData\Roaming\npm\node_modules@angular\cli\bin