1

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

4 Answers 4

11

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
Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

0

I came across the same error and wanted to share some insights on how I resolved it.

Error Details-

(my username)\AppData\Roaming\npm\node_modules@angular\cli\bin\ng.js Line: 1 Character: 1 Error: Invalid Character Code: 800A03F6 Source: Compilation error Microsoft Jscript

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

Comments

-1

Remove the user environment variable

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

2 Comments

same issue, again
have you reopened the command prompt?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.