So this is not as simple as you may think. Now if you go to the ask Ubuntu forum on this and if you ask how to install the latest version of nodejs and npm you will get an incredible flame throw type war on what is the right way and the wrong way to install node on a Linux system. But there are a few more steps with Linux and so that's what we are going to walk through in this guide. If you loved the article and would like to support me, you can buy me a coffee.Now you may think that in order to install node that you simply have to come here to the nodejs site and click download.Īnd if you're on a Windows machine then you would be able to do that. To use a specific node version: nvm use 14.17.0įeel free to reach out to me on Twitter and connect with me on LinkedIn. You can install a specific version of node: nvm install 14.17.0 You can check all the installed versions using the following command nvm lsĬheck the version of node and npm you are running: node -version Install the latest version nvm install node Let's install the LTS and latest stable version of Nodejs, you can also choose one of those if you prefer, but believe me, it's super simple to switch between different node versions using nvm. (If you get an error command not found, restart your shell and try again.) Verify your installation using command -v nvm ( Note: instead of v0.38.0 Use the latest version of nvm from GitHub) If you don't already have it, install curl sudo apt-get install curl This also means you can easily switch node and npm versions with a single command and that comes in handy. Nvm certainly has its advantages as it allows you to easily install and manage multiple node versions on your system. In this tutorial, we will use node version manager or nvm to install and manage node versions. ( NOTE: Although this tutorial demonstrates WSL 2/Ubuntu, this installation is primarily for Linux)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |