Search code examples
githookshusky

Git hooks not generated


I am working on a project that has some git hooks setup using husky. I ran npm install and I can see that husky is installed but the hooks are not generated.

How can I generate the same?

PS I do not have any pre-existing hooks.

Any help would be appreciated.


Solution

  • You can manually trigger hook generation by using node node_modules/husky/husky.js install or node node_modules/husky/bin/install.js for some older versions. Ref: https://github.com/typicode/husky/issues/81