> ## Content Index
> Fetch the complete content index at: https://helpmonks.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Switching from brew to nvm for node install
- URL: https://helpmonks.com/blog/switching-brew-nvm-node-install/
- Published: 2014-04-30T00:00:00.000Z
- Updated: 2026-04-06T20:07:17.000Z
- Description: Many people use a simple “brew install node” to get node running on their machines. However, today I discovered that all global node modules could not be upd
- Author: Nitai
- Tags: email marketing

Many people use a simple “brew install node” to get node running on their machines. However, today I discovered that all global node modules could not be updated properly. I got errors like:

npm ERR! error rolling back Error: Refusing to delete: /usr/local/bin/npm not in /usr/local/lib/node\_modules/npm  
npm ERR! error rolling back at clobberFail (/usr/local/Cellar/node/0.10.26/lib/node\_modules/npm/lib/utils/gently-rm.js:41:12)  
npm ERR! error rolling back at next (/usr/local/Cellar/node/0.10.26/lib/node\_modules/npm/lib/utils/gently-rm.js:27:14)  
npm ERR! error rolling back at /usr/local/Cellar/node/0.10.26/lib/node\_modules/npm/lib/utils/gently-rm.js:36:12  
npm ERR! error rolling back at Object.oncomplete (fs.js:107:15)

Even after removing the symlink and adding a new one, updating brew, force uninstall and install node again, nothing seemed to work.

The only solution I found was to [install nvm (Node Version Manager)](https://github.com/creationix/nvm?ref=helpmonks.com). In order to do so, I first uninstalled what brew installed with:

brew remove –force node  
rm -r /usr/local/lib/node\_modules

Installation of nvm is straight forward as in (I like to always grab the git one if possible):

git clone [https://github.com/creationix/nvm.git](https://github.com/creationix/nvm.git?ref=helpmonks.com) \~/.nvm

Then all is left is to add the below show line to your \~/.profile, \~/.bashrc, etc. file:

source \~/.nvm/nvm.sh

After you finished editing the file, simple restart the terminal and you are all set. Full instructions on the usage o nvm can be found over at the [nvm project page](https://github.com/creationix/nvm?ref=helpmonks.com).

There you have it. A clean install, even with any node version you want to run and many more options then the “normal” brew installation.