1

I am running Ubuntu with a zsh shell, and for some, primarily non apt-get installed cli utilities, I get a command not found error in the cli, when trying to open that application in a new terminal instance.

The problem applications are node and npm, installed via nvm which itself does persist between terminals and a custom cli interface a colleague of mine wrote.

If anyone could point me in the right direction to fix this it would be appreciated.

Edit:

echo $PATH where the commands are present returns:

/home/tylerjoudrey/.nvm/versions/node/v11.4.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

and whereis npm where the commands are present returns:

npm: /home/tylerjoudrey/.nvm/versions/node/v11.4.0/bin/npm

echo $PATH where the commands are not present returns:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

and whereis npm where the commands are present returns:

npm:

closed as too broad by Ipor Sircer, RalfFriedl, G-Man, Thomas, schily Dec 11 '18 at 13:27

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Do the commands' paths show up in the PATH shell variable? – RudiC Dec 10 '18 at 13:51
  • @RudiC How would I go about checking that? – Tyler B. Joudrey Dec 10 '18 at 13:58
  • The command to see the environment variable path is: echo $PATH – Sir Jo Black Dec 10 '18 at 14:17
  • 1
    Use whereis npm or type npm or eventually find to find out the commands' paths, and compare to echo $PATH. – RudiC Dec 10 '18 at 14:20
  • 1
    Was npm giving the command not found error when you ran the echo $PATH and whereis commands whose output you posted? May you describe what you do when npm/node work (e.g. which terminal you are opening), and what you do when they don't? – fra-san Dec 10 '18 at 17:55

Browse other questions tagged or ask your own question.