Node js update4/4/2023 ![]() If it’s not working, try reconnecting to your server and check again. Your server should now be using the installed Node version and NPM version globally! You can double-check this by running node -v and npm -v. You can do this by running nvm use, where is the same as the one you installed during step 4 (in case of the example: nvm use 12.16.2). Activate the required Node version The only thing that’s left to do is to tell NVM to use the Node version your application needs.It’s not needed to manually set the newly installed Node version, as this will happen automatically. It’s also important to run npm config delete prefix to remove the old Node version from your NPM config. By running npm install -g the latest stable NPM version will be installed. ![]() This might cause some issues when you’re trying to install packages or trying to run your application. Update NPM (optional) This step is not always necessary, but the default NPM version on your server isn’t the newest one.For example, if we want to install Node V12.16.2, we run nvm install 12.16.2. Install required Node version Now NVM is working, we can install any Node version by simply running nvm install.If NVM does not work but you did not get any errors while executing the 2 commands above, try reconnecting to your server. You can verify this by running nvm -version. Install NVM While you normally need the Sudo permission to install NVM, you can also run the following commands to bypass this: 1 - curl | bash 2 - source ~/.bashrc NVM should now be installed.However, if you’re not in this directory, run the following command: cd ~ Navigate to the home/master directory The home/master directory should be the default folder you’re in when connecting to your server.If you do not know how to connect to your server, you can follow this tutorial provided by Cloudways: You can find the master credentials under Server Management > Master Credentials in your Cloudways dashboard. Connect to your server via SSH with the master credentials You can either use Putty or the SSH Terminal in the Cloudways dashboard (or any other SSH client), but it’s very important to use the master credentials and not application credentials. ![]() ![]() Click here to start your free Cloudways trial, no Credit Card required!
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |