Unable to git commit

When I commit, I get the following husky error.

I ran npx --version to see if npx was installed.
It showed 8.0.0.
After running rm -rf .husky, I did another git commit, but it didn't solve the problem.


.husky/pre-commit: line 4: npx: command not found
husky - pre-commit hook exited with code 127 (error)


  • npx husky-init npm install

    enter image description here

    npm run prepare