![]() ![]() What’s great about NVM is the ability to declare a different version of node.js on a project by project basis simply by adding a. To check if everything with NVM is now working as expected, the command below will output the current Node version: $ nvm run node -version. This is also useful if you want to change from different Node.js versions too. ![]() Node with long term support $ nvm install -ltsĪ specific version of node $ nvm install 6.15.1Īfter you’ve installed the version of Node that you were looking for, it will be active after running this command. The latest version of Node $ nvm install node There are various different methods of installing node versions depending on project spec or your preference: Note: NVM isn’t supported by the Fish shell (amongst others), you can read about which ones aren’t supported NVM Notes. To do that, we need add the code below to your `~/.bashrc` or `~/.zshrc` files depending on what you’re using. Next up, you’ll want to execute NVM in every shell session. nvm for the current user where the various versions of node.js will reside. Since I wanted to use NVM for managing my local development versions of node, I thought I’d document how you can install NVM via brew despite the fact that it’s not officially supported as of yet.įirst up, install NVM via brew: $ brew install nvm I use to control pretty much all of my local development environment and as of late, I’ve been using it as the crux of my dot files installation sequence too. I’ve been a longtime advocate and user of Homebrew. Since I started using NVM, it's made my local development environment setup (when using node.js) a hell of a lot simpler purely because of how quick and easy it is to switch between various different versions of Node depending on the project requirements.Īs for Homebrew (again, I’m going to assume you already know what Homebrew is). ![]() If you're reading this, I'm going to assume that you already know what NVM is, if not, in short, NVM (or Node Version Manager) is a command-line script to manage multiple active node.js versions. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |