You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context
I have a monorepo like folder structure, but without a package.json in root folder.
root
| - node_project_1
| - node_project_2
Based on the docs I went inside node_project_1 and executed npx husky init in terminal. This command simply generated a .husky directory and a pre-commit file.
My pre-commit hook didn't work.
Next I followed the "project not in git root directory" part and updated the prepare command to "prepare": "cd .. && husky node_project_1/.husky".
Post running npm run prepare I got a _ directory in .husky and pre-commit hook started working correctly.
This was observed on a MAC with node version: v22.11.0 and husky: ^9.1.7
Thank you!
The text was updated successfully, but these errors were encountered:
Troubleshoot
https://typicode.github.io/husky/troubleshoot.html
Context
I have a monorepo like folder structure, but without a
package.json
in root folder.Based on the docs I went inside
node_project_1
and executednpx husky init
in terminal. This command simply generated a.husky
directory and apre-commit
file.My pre-commit hook didn't work.
Next I followed the "project not in git root directory" part and updated the
prepare
command to"prepare": "cd .. && husky node_project_1/.husky"
.Post running
npm run prepare
I got a_
directory in.husky
and pre-commit hook started working correctly.This was observed on a MAC with node version:
v22.11.0
and husky:^9.1.7
Thank you!
The text was updated successfully, but these errors were encountered: