I'm using Git Fork as my Git client. Recently I made some changes to my installation of Node JS. After doing so all my pre-commit hooks threw an error saying npm: command not found.
I can use NPM from the terminal, but for some reason Git Fork isn't able to find it. Does anyone know why?

From Git Fork Support
Most probably your ENV in command line is different. Start Fork from CLI (
open -a Fork .) to make it inherit ENV of the parent process. Then both your terminal and Fork will have the same PATH.
In my case, the problem was that my nvm configuration was in the wrong file. I had the code to determine my current node version in the .zprofile file. But this file is ignored by Fork. If you move that code to the .zshrc file, which is by the way the official place according to the nvm documentation, then Fork is able to determine the current node version and can use npm.
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