Husky V9 Issue - command not found in the PATH - with the hooks code in python

174 views Asked by At

I am currently using Visual Studio Code version 1.85.1, Node.js version 20, and Husky version 9.

I've been using Husky since December, starting with the previous version, and my initial experience was excellent. I had no issues running the hooks coded in Python, and I easily shared them with other developers who executed the npm install command without any problems. The hooks I previously managed in the .git/hooks/ folder worked seamlessly in the .husky/ folder.

However, after installing the latest Husky version like below:

npm install --save-dev husky

and then:

npx husky init

I encountered a behavior change, and I received the following error message:

image

I have read the tutorial and found a relevant chapter: "Understanding PATH and Version Managers." According to my understanding, I need to create a folder in my repository, .config/husky/, and then create the file init.sh in it.

In the init.sh file, I added the line ~/python since Python on my laptop is installed in C:\Program File\python. Is this correct, or did I make a mistake? I followed these steps, but the issue persists.

0

There are 0 answers