After ubuntu 16.04 installed nodejs using nvm, Switch user disappeared

  node.js, question

Ubuntu 16.04 uses root authority. after installing nodejs in nvm, enter node -v with version number and npm -v with version number. then switch to another user. when node -v indicates that nodejs is not installed, then switch to root. when node-v indicates that nodejs is not installed, then switch to root, and the previously installed nodejs are gone! What is this?

nvm will only be available to your user account (the one used to
install nvm)

All users are available if required. Soft links is needed.
In addition, the binary installation script of NodeSource is recommended under Ubuntu.https://github.com/nodesource …

# Using Ubuntu
 curl -sL  https://deb.nodesource.com/setup_6.x | sudo -E bash -
 sudo apt-get install -y nodejs