I have nvm installed to manage my node versions. If I install a package globally, npm install -g fkill
, then run fkill
, I get the error zsh: command not found: fkill
.
Here are some commands run to help with debugging this
$ npm root -g
/home/jchi/.nvm/versions/node/v10.15.3/lib/node_modules
Looking at my PATH...
$ echo $PATH
/home/jchi/.pyenv/shims:/home/jchi/.pyenv/bin:/home/jchi/.nix-profile/bin:/home/jchi/.autojump/bin:/home/jchi/.nvm/versions/node/v10.15.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
I do not see the output of npm root -g
in my PATH.
I assume is nvm's responsibility to add that to my path so globally installed packages can be run. So I look at what I have in my .zshrc
that kickstarts nvm.
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
105 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
Suggestions appreciated
Looking at your PATH, you do have the nvm bin folder under your PATH.
/home/jchi/.nvm/versions/node/v10.15.3/bin
I would suggest to check if you have prefix related settings in ~/.npmrc
.
If you have any prefix settings, please remove it.
Then try running npm install -g fkill
again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With