And this works for any other global npm package. Then update & upgrade: sudo apt-get update sudo apt-get upgrade Then get your desired Node version: //where setup12.x, replace with desired major version curl -sL /setup12.x sudo -E bash - And then install your new node version: sudo apt-get install -y nodejs That should do it. Great thing is that npm can update itself. This will ensure that we have the latest version of the packet manager before we proceed with the installation of Docker. # 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |