
Allows you to experiment with any version of Node.js without affecting other projects on your machine.Some of the advantages of using a node version manager include: Advantages of using a node version manager With a node version manager, you can install and switch between multiple versions of Node.js based on the needs of the different projects you are working on.

Installing Node.js via this method allows you to only have a single installed version of Node.js at a time on your machine.īut what do you do if you are working on several projects where each project requires a different version of Node.js to run smoothly? The default and most common way of installing Node.js on a Windows PC is via a Node.js installer. If you are a front-end developer chances are high that you have worked with Node.js in one way or the other. It is widely used for both front-end and back-end software development. Node.js is a popular, open-source, cross-platform JavaScript run time environment. This post is a step-by-step guide on the recommended method of installing Node.js on a Windows PC using a Node Version Manager, popularly known as nvm. And this works for any other global npm package.Photo by Caspar Camille Rubin on Unsplash Great thing is that npm can update itself. # navigate to nvm's node lib folder # (replace v8.4.0 with your version) cd ~/.nvm/versions/node/v8.4.0/lib/ # update npm right there npm install npm # reopen your terminal

Once I found it, it was super easy to update npm in that specific folder. So I tried to find a path where global packages are installed when using nvm. I can't remember the exact error, but it was probably something with my PATH configuration. However, when I was using a "system" node version, installed from Node.js website, it did. Recently I got npm update notification, that looks something like this:įor some reason, when I had node installed through nvm, npm i -g npm didn't work. Node Version Manager is easy way to install, manage and work with multiple node versions.

If you are JavaScript developer and not using nvm you might want to look at it.
