Posts

Showing posts with the label nodejs

how to setup nodejs

install nodejs for a single user nodejs apps needs to be run under user not glabally or even root this will encounter errors add the user in sudoers file usermod -aG sudo username passwd username then install nvm globally sudo apt install curl curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash then install node js using nvm then add bash profile manually vi ~/.bashrc export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm add above to lines in bashrc => Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zprofile, ~/.zshrc, and ~/.profile. => Create one of them and run this script again    OR => Append the following lines to the correct file yourself: export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm strap5887@vmi728455:~/public_html/strapi-backend$ sudo mkdir -p /home/strap5887 if you m...