The \AppData\Roaming\npm\node_modules@angular\cli\bin\ng.js file cannot be opened and it gives an error whenever I try to use an ng command anywhere, be it in an angular project or elsewhere.
The error is as follows: Script: (my username)\AppData\Roaming\npm\node_modules@angular\cli\bin\ng.js Line: 1 Character: 1 Error: Invalid Character Code: 800A03F6 Source: Compilationerror Microsoft Jscript
What I have tried:
using ng commands in different project -- same error reinstall npm, angular, removing the node modules in all combinations Setting the angular path in the environment variables
What happened before: ng command was missing possibly due to stuff related to python install. This error is replaced with my current problem when reinstall is done.
I have reinstalled everything to the fullest extent but the problem keeps persisting. I can use my angular project by running 'npm run ng serve' and that weirdly works.
Does anyone have ANY idea what might cause this problem
EDIT: I have somehow managed to resolve the problem but I have no clear answer what was the cause of it all. I did reinstall nodeJS on my computer which MIGHT have been broken during another project.