Use npm Package Commands in Fish Shell
April 20, 2020
set -x PATH {your npm path} node_modules/.bin $PATH
to ~/.config/fish/config.fish
.set -x PATH {your npm path} $PATH
, which means set a variable to name PATH, with value {your path} and current value $PATH. Space between values works like an add. You can type this command in terminal or create a file ~/.config/fish/config.fish
and save the command in it. Fish runs this config file automatically when launching. To check your npm path, use npm config get prefix
.node_modules/.bin
. The command will be like set -x PATH node_modules/.bin $PATH
.