error Command "husky-run" not found.

See original GitHub issue

I’ve faced an issue with husky which prevents me from committing, It’s kind of confusing because it was working before that, but now, I’m getting an error which says error Command "husky-run" not found.

I’ve checked it and it was in package.json and also I upgraded it and removed and installed it again, but it doesn’t fix that, image How can we fix it? (someone on stackoverflow said we should remove git hooks and so on, which seems not a very good solution).

this is my pre-commit: image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
abubakir1997commented, Apr 1, 2021

for husky version 6 run yarn husky install (@typicode solution)

2reactions
typicodecommented, Mar 4, 2021

Yarn doesn’t seem to run husky’s uninstall script when upgrading husky, which leaves some files in .git/hooks.

Two ways to fix that:

  • Check that you don’t have anything personal in .git/hooks (this should be the case for most people) and delete .git/hooks.
  • 👉 Use @schinery solution and run yarn husky init (recommended) (you can still remove everything in .git/hooks, if you want to clean any artifact lefts by husky v4 😃
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix error 'not found husky-run' when committing new ...
To fix this there are two methods, depending on which version of Husky you are already on. If you're using Husky v4 or...
Read more >
Command "husky-run" not found. · Issue #854 - GitHub
Just have upgraded from v4.3.8 to v5.0.9 and got the error have tried to uninstall/install husky, remove npde_modules - nothing helped > git ......
Read more >
husky: command not found with npm install --production
Recently, while attempting to build a Docker container, I ran into a bit of a dilemma. Upon running npm install --production I was...
Read more >
error command "husky-run" not found. - You.com - You.com
#Solution 1: ... Delete the .git/hooks folder and then do the npm install for reinstall husky. There are chances for conflicts with husky-generated...
Read more >
Husky - Git hooks
Command not found ... If you're running Git from an app and the command can be found in your terminal, this means that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found