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
- Inside your projects root directory , go to .git directory by typing
cd .git
. - Now delete hooks directory by typing
rm -r hooks
2. Method
- Another way to solve this problem is to use –no-verify during git commit.
- For example :- git commit -m “commit message” –no-verify