Switching from brew to nvm for node install

Switching from brew to nvm for node install

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:

[code]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)[/code]

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). In order to do so, I first uninstalled what brew installed with:

[code]brew remove –force node
rm -r /usr/local/lib/node_modules[/code]

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

[code]git clone https://github.com/creationix/nvm.git ~/.nvm[/code]

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

[code]source ~/.nvm/nvm.sh[/code]

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.

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.

Helpmonks All-in-one Customer Service Platform
Installing node, npm and express on MacOS X

I've recently done a lot of work with Nodejs and thought I give a short installation guide on getting up and running on the Mac since there seems some confusion how to install it.

Helpmonks All-in-one Customer Service Platform
Python wxPython install on MacOS X 10.8.x

wxPython is a GUI library kit for developing desktop application with Python. Since it is cross-platform you can actually run your code on MacOS X, Windows and Linux. Now, while installing wxPython on my development environment (MacBook Air 13", MacOS X 10.8.x) and the standard installer from the wxPython website I've…

Helpmonks All-in-one Customer Service Platform
Python and Django: ImportError: No module named django.core

Python is without a doubt a great language. Django is a great framework. It is just obvious to use them and get your site up and running. So, today, while setting up a new site with "django-admin.py startproject mysite" I've run into the "ImportError: No module named django.core" error. While…

Helpmonks All-in-one Customer Service Platform
SELinux and FFMpeg

SELinux is a good thing, but it also requires you to watch out on some libraries. Sometimes, something just fails, because SELinux does not allow it to run. This so happens when you have SELinux installed and want to run FFMpeg. I just run into this when I tried to…

Helpmonks All-in-one Customer Service Platform
ImageMagick and Ghostscript playing nice with web applications

I had to spent way too much time the last time to set up ImageMagick and Ghostscript together that I simply jump right in so you don't have to waste time on this, like I did. Creating thumbnails and images from a PDF is one of the most used features…

Helpmonks All-in-one Customer Service Platform
Fix for running MySQL 5.5.8 under MacOS X 10.6.5 (Snow Leopard)

Oracle recently released the latest MySQL 5.5.x versions. Despite of having tones of fixes and supposedly running much faster and (finally) making InnoDB the default storage engine, it is always good to keep up to date with latest releases. But, as in the past, MaxOS X users always have to…

Trusted by over 2,000 organizations with millions of emails

Helpmonks helps us answer customer emails at lighting speed
We couldn't do our job without Helpmonks!
Helpmonks, the best thing since sliced bread
Excellent option for collaborating email amongst your team
A good platform that is here to grow and help you grow
Helpmonks is a great tool that our company utilizes and depends on
Great shared inbox for the team
Fantastic email support service for any business
Easy to navigate and catalog data for specific users
Solid Helpdesk software w/ responsive customer support
A really good solution to manage customer support mailbox
Good support, useful features

One more thing...

Helpmonks gives you the ability tocollaborate as a groupin your shared mailbox, features aTeam To-Do App, powerfulCustomer Relationship Management (CRM)capabilities, a completeLive-Chat tool, a mighty Email Marketing Platform that includes sending ofemail campaignsandemail automation, collision detection, email tracking, reminders, mentions, custom fields, custom applications, customer satisfaction ratings, Single-Sign-On (SSO) & SAML authentication, Trello, Zapier, Slack, an API, and much more.

Check outthe complete feature listor sign up for afree 30-day shared inbox trial now