0

After installing a global dependency using:

npm install -g react-native-cli

Fish shell does not recognize the global command. After looking around on SO I found a few posts related to npm install bin being in the $PATH. I tried some of the suggestion but could not find a solution.

echo $PATH

/usr/bin /bin /usr/sbin /sbin /usr/local/bin /opt/X11/bin

How do I include my global node modules in my path? Or is there another solution?

tripleee
  • 175,061
  • 34
  • 275
  • 318
Jordan Hensley
  • 420
  • 7
  • 18
  • Why is this tagged [tag:bash]? – tripleee Jan 01 '18 at 17:38
  • Quick googling gets me https://github.com/fish-shell/fish-shell/issues/3023 – tripleee Jan 01 '18 at 18:02
  • yes, I saw this article. With a solution (Just a note, what ended up fixing my issue was editing the config.fish file and setting: set PATH /Users/{myusername}/{global-npm-folder}/bin $PATH) I am just having trouble finding out how to actually do this. – Jordan Hensley Jan 01 '18 at 18:07
  • Uh... You solved it but you don't know how? – tripleee Jan 01 '18 at 18:15
  • I am a command line noob. I'm not sure where to find/how to edit config.fish, also how to find the name of the global-npm-folder – Jordan Hensley Jan 01 '18 at 18:20
  • I meant to add a second duplicate but with the [tag:bash] tag gone I can't. See also https://stackoverflow.com/questions/18383476/how-to-get-the-npm-global-path-prefix and if you have further questions, googling those won't be very hard either. – tripleee Jan 01 '18 at 18:26
  • There has been some dissatisfaction with the search facilities on Stack Overflow itself. I usually google with `site:stackoverflow.com` as a search term (but often don't need to, because SO generally comes up among the top search results in Google for me even without that). – tripleee Jan 01 '18 at 18:28

0 Answers0