1

I keep getting 'git' is not recognized as an internal or external command, operable program or batch file.

and

'npm' is not recognized as an internal or external command, operable program or batch file.

I have installed both, and have also manually added the paths to environment variables -> system variables -> path which were already present. I have also uninstalled and reinstalled both applications. I am now out of ideas. Any help would be appreciated.

Edit

Using Windows 10, C:\Program Files\Git\cmd;C:\Program Files\nodejs; are the current paths. Ive checked program files and the folders with the installed files are there

2
  • Where are you getting those error messages? Commented Sep 9, 2021 at 23:33
  • @mkrieger1 in the command line. Its where I prefer to do my git stuff Commented Sep 10, 2021 at 14:35

1 Answer 1

1

Make sure to open a new CMD, and check your %PATH% does indeed refers to those tools.
Type:

where git
where npm

You should see for instance C:\Program Files\Git\cmd\git.exe

As noted in the command, if that is not the case, re-installing Windows is recommended.

Sign up to request clarification or add additional context in comments.

8 Comments

Sorry for the slow response, I was away from my desk. I get the same response with where. 'where' is not recognized as an internal or external command, operable program or batch file. Seems like maybe a command line issue?
@MarkSmith You would get that error is you are not in a CMD, but a bash session. Open a CMD first. (Or: you are in a CMD, but with a %PATH% quite incomplete, without C:\Windows\System32.
I am in a CMD session, I only use command line for Git. I checked environment variables and it did have %SystemRoot%\system32. However I did add C:\Windows\System32 to make sure that wasnt the issue. It still doesnt work
@MarkSmith Did you relaunch a new CMD? Does dir C:\Windows\System32\where.exe work?
Launched a new cmd, restarted etc. Just added that line and it still doesnt work. At this point im thinking I just reinstall windows
|

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.