タイトル通り。GUI使いたいし、husky使いたいのに以下のようなエラーがでてくるので直接Gitコマンドを叩かざるを得なくなり困った。
.git/hooks/pre-commit: line 49: node: command not found
SourcetreeやTowerは.bash_profile
や.bashrc
を読み込まないので(?)、nodeがどこにあるかわからない模様。対応としては、いちどSourcetreeやTowerアプリを終了して、普段使うターミナルからアプリを起動しなおせばOK。
SourceTree
-
SourceTreeのコマンドラインツールをインストールした状態で「
stree
」コマンドを実行。 - もしくは「
open ~/Applications/SourceTree.app
」のコマンドを実行
Tower
Towerのコマンドラインツールをインストールした状態で「
gittower
」を実行。もしくは「
open /Applications/Tower.app
」のコマンドを実行。
参考
環境
- macOS High Sierra 10.13
- Sourcetree 2.7
- Tower 2.6
- ndenv 0.4.0 でNodeを管理