husky > pre-commit hook failed (add –no-verify to bypass) – Solved

Error :

husky > pre-commit (node v19.7.0)
sh: yarn: command not found
husky > pre-commit hook failed (add –no-verify to bypass)

Solution :

There are two ways to resolve this issue during commit.

1. Method

  1. Inside your projects root directory , go to .git directory by typing cd .git .
  2. Now delete hooks directory by typing rm -r hooks

2. Method

  1. Another way to solve this problem is to use –no-verify during git commit.
  2. For example :- git commit -m “commit message” –no-verify

Leave a Reply