After restart "which discovery" command returns blank

Hey everyone!

After executing the following commands:

  1. “$ npm config set prefix ~/.npm”
  2. “$ export PATH=”$HOME/.npm/bin:$PATH" "

The command “$ which discovery” does give the location of where discovery is located on my machine, if i understand that correctly at least, however whenever I restart my machine it no longer can find it and prohibits me from executing any discovery commands.

Does someone perhaps know what is going on here?

Hey @Franklin, the export PATH command needs to go in your ~/.profile which is read when you login. Otherwise, you have to execute that manually every time you reboot or login. That’s no fun ;-).

Just add this to the end of your ~/.profile:

export PATH="$HOME/.npm/bin:$PATH

The export command is telling the shell (bash or whatever you’re using) to add the location where you’ve installed discovery to your PATH, before what’s already stored in PATH environment variable.

1 Like