2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

husky バージョン3 で git hooks が動かない

Posted at

huskyを使ったhooks/pre-commitの追加がうまくできず詰まりました。

原因

huskyCHANGELOG.mdに以下をみつけました。

Breaking change husky requires now Git >= 2.13.2. If you're already using husky v2 and don't use an old version of Git, you can safely upgrade.

(Breaking changeならreadmeのわかりやすいところに書いといてよ。)

yarn remove huskyしたら上記のメッセージでました。yarn addで出してほしいのと、前回removeしたときはでなかったような。見落としてたかも。

解決策

  1. git のバージョンを2.13.2まで上げる。
  2. husky のバージョンを2.7まで下げる。
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?