


If you dont have Node.js downloaded yet, simply do this: F or updating Node.js, you will need to use Node Version Manager. If you want to have the latest version of Homebrew installed, you can check what version you already have: Also, if you want to see what packages you already have downloaded see here. The installer will automatically install the latest version of Node and remove any older versions. If you installed Node using the official binary packages on the Node website, then all you need to do is download the latest version of Node and install it. Lets explore the different ways you can update your Node version. You can get up-to-date with formulae and upgrade to the latest Node.js version with the following. Assuming you have previously installed node with brew install node.

Homebrew is one of the two popular package managers for Mac. The best way to install/upgrade nodejs is to use Node Version Manager here: /creationix/nvm or read this answer below When use command node -v to check whether upgrade success, remember to open a new terminal, otherwise you will still see the old version displayed. Anyway, Id recommend using nvm, which can be installed through Homebrew. You can also install multiple versions and select which one you want to use with the brew switch command. This did the trick If versions on homebrew/code are defined right, you must also be able to brew install for example. This error message is telling you that the command brew update is used to update brew itself, and that if you want to update node, you need to run brew upgrade node. is the following: brew update, then brew upgrade node, then npm install -g npm working? Show activity on this post.
