Few months back all worked well but now some update or something broke my setup for Angular development setup. I got all latest node, npm, ts, ng and VS code. Used to work well. But today, after few months i updated all and found that these commands for ng doesnot work in Git BASH MING64 command window. All works well and in windows cmd and powershell. I noticed strange forward and backward slashes in path under git Bash window though. My environment path for System and current user all set.
RonPC@RON-DESKTOP MINGW64 ~/Documents/VScode-Projects/AngularProjects/angular2020/jan2020 (master)
$ ng --version
C:\Users\RonPC\AppData\Roaming\npm/node_modules/node/bin/node: line 1: This: command not found
RonPC@RON-DESKTOP MINGW64 ~/Documents/VScode-Projects/AngularProjects/angular2020/jan2020 (master)
$ npm ng --version
C:\Users\RonPC\AppData\Roaming\npm/node_modules/node/bin/node: line 1: This: command not found
RonPC@RON-DESKTOP MINGW64 ~/Documents/VScode-Projects/AngularProjects/angular2020/jan2020 (master)
$ npx ng --version
C:\Users\RonPC\AppData\Roaming\npm/node_modules/node/bin/node: line 1: This: command not found
RonPC@RON-DESKTOP MINGW64 ~/Documents/VScode-Projects/AngularProjects/angular2020/jan2020 (master)
$ node v
C:\Users\RonPC\AppData\Roaming\npm/node_modules/node/bin/node: line 1: This: command not found
RonPC@RON-DESKTOP MINGW64 ~/Documents/VScode-Projects/AngularProjects/angular2020/jan2020 (master)
$ node --version
C:\Users\RonPC\AppData\Roaming\npm/node_modules/node/bin/node: line 1: This: command not found
RonPC@RON-DESKTOP MINGW64 ~/Documents/VScode-Projects/AngularProjects/angular2020/jan2020 (master)
anyone got tip to get it fixed. I tried installing git BASH again but no help. regards
Screenshot of path for system environment vars
Screenshot showing my installed components of node, npm and ng
Solution:
After going through numerous solution listed on different forums, re-installing Nodejs/Git Bash cmd, tinkering PATHS.. no luck.
Very simple solution:
But i uninstalled "node" from Add Remove Programme --> deleted folder"npm" & "npm-cache" from location --> C:\Users\RonPC\AppData\Roaming
Reinstalled Node.js(npm installed with it) and it worked like charm.
Hopefully it saves anyone having trouble for this reason.
Regards
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With