And this works for any other global npm package. To check the version of Node. Before you actually upgrade Node.js, do check if the currently installed version is what you want or it is outdated. To know how to do that, continue reading. There are other ways to upgrade Node.js manually. Great thing is that npm can update itself. sudo apt-get install -only-upgrade nodejs. # 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 |