

And this works for any other global npm package. 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. To install nvm on MacOS, the first step is to download it with this command: curl -o- bash 0.39.0 is the latest version at publish time, but it may be worth checking the nvm installation readme and getting the latest, if different. 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.
