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
There are no minimal steps for Windows (f.e. install Node.js, try a lot of things, hope it works, end with a workaround, then don't go back and figure it all out again).
Error:
/bin/bash: D:/Program Files (x86)/nodejs/npx: No such file or directory
husky - pre-commit hook exited with code 127 (error)
husky - command not found in PATH=...
However I can git commit just fine in PowerShell or CMD, and it runs the hooks. I can see npx and other commands in my Path.
I get this issue when trying to commit in GitHub Desktop.
Workaround:
Using the direct path to the executable without npx solved the issue for now:
It may be a little strange workaround, but in the end we have to run it via a package manager only because node_modules/.bin is not added to the path so husky cannot find the relevant commands.
If you were to manually modify the path it would work just fine without it.
Troubleshoot
https://typicode.github.io/husky/troubleshooting.html
Context
Please describe your issue and provide some context:
Error:
However I can
git commit
just fine in PowerShell or CMD, and it runs the hooks. I can seenpx
and other commands in my Path.I get this issue when trying to commit in GitHub Desktop.
Workaround:
Using the direct path to the executable without
npx
solved the issue for now:Thank you!
The text was updated successfully, but these errors were encountered: