Help us understand the problem. What is going on with this article?

SourcetreeやTowerでhuskyを使おうとするとnodeコマンドが見つからなくて動かないのを解決する

More than 1 year has passed since last update.

タイトル通り。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

参考

環境

  • macOS High Sierra 10.13
  • Sourcetree 2.7
  • Tower 2.6
  • ndenv 0.4.0 でNodeを管理
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした