Windows Script Host Error: Invalid character - Code:800A03F6 - Source: Microsoft JScript compilation error
Solution 1:
Update:
On Windows .js files are associated to Windows Scripting Host by default, so the script will not be run with Node.
Open a file explorer and find a JavaScript file, open the JavaScript file's properties and then "open with", select the Node.js program file to open that kind of files.
The error should stop after doing this.
Solution 2:
This is how I solved it: (on windows 10)
Go to C:\Users\<your_username>\AppData\Roaming\npm\node_modules\@angular\cli\bin
Check for ng.js
Right click on ng.js file and click on "properties
" option
You need to open it with node.exe so click on "Change" button go to node js installed directory and
(example: C:\Program Files\nodejs\node.exe)
Select node.exe
Click on OK
It should change the color of ng.js like below:
Now try ng -v and other ng commands