Follow the steps below: Step 1: Update Ubuntu If you use the Node Version Manager (NVM), you can install any specific version of Node.js and npm. You can verify what version is installed by running: node -v Installing any specific Node.js and npm version on Ubuntu with NVM When using NodeSource, both nodejs and npm get installed with the command above. To install Node.js (the version you chose from step 2) and npm together, run the following command: sudo apt-get install nodejs If you want to install a different version, check the GitHub repo linked above and choose a different version.Īfter the script finishes, you can move onto installing Node.js. Run the following command: curl -fsSL | sudo -E bash. As of writing, the current version is v17. For this tutorial, we’ll use the “current” method. You can choose from multiple Node.js versions, including 17, 16, 14, and 16 LTS, or “current”. To install the PPA, download and run the NodeSource script for the version you want to install. Sudo apt-get upgrade Step 2: Install the NodeSource PPA Step 1: Update Ubuntuīefore starting with anything, update your system: sudo apt-get update You can use NodeSource’s repositories (PPA) to install newer and more versions of Node.js and npm. Installing newer versions of Node.js and npm through NodeSource As of writing, the version of Node.js that’s included in the default Ubuntu repositories has reached its EOL.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |