Daemon-Technologies / docs

All you need to build about stacks-2.0
4 stars 14 forks source link

nvm & npm not found #7

Open gzelda opened 3 years ago

gzelda commented 3 years ago

When doing test with @xanbots, it shows the System environment file is in ~/.profile, but reopen the terminal it doesn't source ~/.profile automatically, should do it manually.

whoabuddy commented 3 years ago

This varies a little bit on Linux but I had similar issues, to get around it I was doing two things:

  1. Checking for the .nvm folder in the home directory to detect if installed, followed by sourcing the env vars on each run to be sure nvm was available.
source $HOME/.nvm/nvm.sh
source $HOME/.bashrc
  1. Checking for node by running it, and if it worked then npm/npx did as well, I didn't have to update anything.