LoginSignup
0
0

More than 5 years have passed since last update.

【fish】npm -gでインストールしたらパッケージのコマンドが使えなかった

Posted at

概要

npm -gでionicとcordovaをインストールしたらcommand not foundと言われたので色々調べて解消した話。

現象

  • npm -gでインストールしたのにパッケージが使えない!ただ、パスを指定すれば動く
  • shellはfishを利用

原因

PATHが通って無かった。

対応(ダメだったやつ)

shell上でexport PATHを試すが、なぜか既存のPATHが上手く反映されなかった。

$ echo $PATH
/usr/local/bin /usr/bin /bin /usr/sbin /sbin
$ export PATH=$PATH
$ echo $PATH
/sbin

何故じゃぁぁぁぁああ...(´・ω・`)

対応(解決したやつ)

fish_user_pathsを使う。コマンドは以下のような感じ。詳細はこちらを参照。

$ set -U fish_user_paths /hoge/piyo/bin $fish_user_paths

最後に

自分の使ってるものはちゃんと理解しないとダメですね。

0
0
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
0
0