angular CLI commands are not working in vs code git bash whereas it's working in Powershell. the error is as follows:- C:\Users\amitk\AppData\Roaming\npm/node_modules/node/bin/node: line 1: This: command not found
2 Answers
I know it's little bit late, but maybe it'll help some other folks.
You have to set alias ng in git bash, after that it will work.
First localize ng.cmd file in C:/Users/Username/AppData/Roaming/npm/ng.cmd
Go to your git bash and type in:
alias ng='C:/Users/Username/AppData/Roaming/npm/ng.cmd'
After that it will recognize your command.
To set alias ng permanently in git bash, you have to edit the aliases.sh file in C:/Program Files/Git/etc/profile.d/aliases.sh.
Just add the alias syntax to the other ones.
Hope this helps!
Comments
Please check the value of the path variable in your environment variable. looks like it can't find the node command from the path in your git bash environment. Sometime in your windows, the node was pointed to the windows node folder.
In the Powershell please run the command below to identify which node location it's using
where node
In your git bash check whether the path contains the directory which contains node command.
1 Comment
Get-Command. Alternatively, use where.exe, but you must invoke it with .exe, because where is a built-in PowerShell alias for the unrelated Where-Object cmdlet.