-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Husky 4.x not working with Sublime Merge (GUI) #696
Comments
Exact same issue with GitKraken and WebStorm git clients. None of the workarounds are working for me either. |
In addition to https://github.com/typicode/husky#local-commands-huskyrc I removed my system node version; which fixed it for me. |
Could you folks please chime in in this issue: #639 ? I believe it's related. In my opinion, project should move back to |
My bad, the workaround mentioned in the doc worked for me. For others, (just in case as I did missed it first time), the file must be created in your home folder (~/.huskyrc) not at your project root (that was my mistake). @thasmo: Messing with your system node version might not be a good idea as it might be used by some obscur service or expected by others… Seems a bit extreme IMHO. |
@zuzusik Don't know if downgrading to run-node is the right call but I agree that forcing people to add a file in their home folder in order to be able to use a package.json dependency is off. It forces me to either document it and ask coworkers to do a manual task after a clone or automate it. Too invasive. |
In v3, In particular, Yarn 2 introduced PnP (which is great) but with it all modules are in one file ( That's why husky 4 uses package manager to run hooks. Node modules organization is abstracted from husky this way. Regarding Node version managers, it's another topic. GUI and version managers don't communicate well. There are also many ways to install Node, you can have a coworker using So having husky support all these tools would be complicated. That's why for GUI users, you can have some init code for your favorite version manager in |
I had the same issue with husky 7.0.4 on a Mac with Sublime Merge. Husky worked fine from the CLI but not from Sublime Merge. The problem was that Husky was unable to find The fix was to create the file
And in
|
Thank you @tomasznguyen, worked like a charm for me with husky 8.0.1 ! |
I'm using node with nvm and yarn.
I can commit with husky from the command line. But when using a GUI like Sublime Merge I get that kind of error:
I read and tried what is explained in section "Node version managers" without better results (including .huskyrc file).
My project is configured for Node 12 and has a corresponding .nvmrc file at its root. Node 12 is also the default for the whole system. Plus Node 13 is not installed.
If I remove my husky hooks, everything works fine. If if I downgrade to husky 3.1.0 it works too.
Any idea?
The text was updated successfully, but these errors were encountered: