I am trying to have multiple connections to my dev server by ssh-ing once into my server and the using screen to open multiple sessions. My problem is that when I run nvm command in screen, the command can not be found. When I exit screen and run the command in the pure ssh terminal it runs fine. I think this is a PATH problem. I wanted to get an absolute path for nvm to see if I can run that in screen.
I ran the code below to find the path
~$ nvm
//SHOWS USAGE INFO
~$ whereis nvm
nvm:
~$ screen
//LOADS INTO SCREEN SESSION
~$ nvm
bash: nvm: command not found
What does this mean for the install of nvm. If I change its install directory could I then run it in screen. If this is the case then why wouldn't screen run nvm in the first place.
For switching to different versions that are already installed you can use the following commands for different scenarios: nvm use node #uses latest Node. js version available on server. nvm use --lts #This will switch to the latest LTS version nvm use 14.15.
Before installing NVM, you do not need a Node version installed on your machine, and, if you do have Node installed, it does not matter. Installing NVM and using it to install Node versions will work separately from the existing one.
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