I have recently added some dependencies to the package.JSON and tried installing npm . but it shows errors related to git not found
Error Screenshot
In my case, I had Git installed, but it was only accessible from Git Bash (I had selected the first option below when installing). I reinstalled with the second option and it solved the issue: