Skip to content

Instantly share code, notes, and snippets.

@martiuh
Last active January 20, 2017 19:37
Show Gist options
  • Save martiuh/0fc82ca0a2375c60cccc65cece6438e0 to your computer and use it in GitHub Desktop.
Save martiuh/0fc82ca0a2375c60cccc65cece6438e0 to your computer and use it in GitHub Desktop.
Fish shell: Add NPM Globals to PATH

fish version installed (2.4.0):

Ubuntu 16.04: LinuxBrew (Homebrew 1.1.6) npm 4.0.5

If you guys are having troubles running your globally installed npm modules, you just need to find the bin folder in my case is located here:

~/.linuxbrew/Cellar/node/7.0.0/bin

then you just need to prepend that location to your $fish_user_paths like the docs tell.

set -U fish_user_paths ~/.linuxbrew/Cellar/node/7.0.0/bin $fish_user_paths

Please notice that the PATH is linked to certain node version, if yours change, you need to update the path. If you are handling two or more node versions and each have different global installed then you should update $fish_user_paths to your needs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment