![]() Make sure you check the NVM Github project page to get the latest version and replace the version shown in the commands below. Use one of the two ( curl or wget) commands below to run the nvm bash script.Īt the time of publication, NVM v0.34.0 was the most recent version available. Now we are ready to install the nvm package. To open it, either open your Applications folder, then open Utilities and double-click on Terminal, or press Command - spacebar to launch Spotlight and type "Terminal," then double-click the search result. There will be times when applications need different versions of Node.js to work, so having the flexibility to change that is important and will save you a lot of time.īefore going through these steps, open a new terminal window. After updating the repository index of homebrew package installer, we need to install Node.js using the following command: brew install node.js. And compared to other Node.js installation methods, it has the easiest ways to have multiple versions of Node.js without adding much extra complexity. We will be using the Node Version Manager ( Nvm). Npm install -g hope you like this tutorial please share your love and spread this post.You now have Node.js installed and it's ready for you to use! macOS Then, as soon as you start it up, the installer will walk you through the rest. Installing Node.js on MacOS: Step 1: Download the Node.js from this link, here you will be able to see two versions one is LTF which stands for long term version and the other is the latest version so we need to download the LTS version because it is supported for the long term, it is a stable version. Then, verify the version by running: node -version. To install the current LTS Node.js version, execute: nvm install -lts. ![]() ![]() Running the command nvm install node would install the current version with the latest features. All you have to do is to download the installation file for Mac. At the time of writing this post, the current LTS version is 16. Installing Node.js on macOS follows almost the same procedure as Windows. To update current version of npm run following command: Were going to install it using nvm (Node Version Manager), because it makes it easy to change Node versions and upgrade Node. Follow these step-by-step guidelines to install Node.js on macOS. To install npm version you like you can first check the installed version of nodejs and npm as below: To uninstall specific node version you can run following command: Now, that you have multiple versions of nodejs each time you want to work with specific version of node js run following command to pick one you like:Ībove command will make v12.13.1 as a default node version. Now to install nodejs pick the version you like to install and run following command on your terminal window: To check available nodejs version run following command on your terminal window. Once you have nvm installed on your machine let's now install nodejs and nvm. Install Visual Studio Code (or our IDE) on macOS and the Windows OS. Let's first install NVM (Node Version Manager) on our mac or linux machine using following tutorial: How to install NodeJS and NPM on macOS and the Windows OS. This updates Homebrew with a list of the latest version of Node. You can use nvm to manage different types of nodejs on your mac or linux machine. Installation Steps Open the Terminal app and type brew update. ![]() ![]() When you are working on different nodejs based projects it is good idea to work with multiple nodejs versions. Homebrew is a package manager for Mac and helps to easily install and uninstall softwares on a Mac. Installing different versions of Nodejs on Mac OS or Ubuntu ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |