Srini's Point of View

My thoughts on technology, food and other fancies…

How to install npm packages on osx without sudo

One of the best features of python is how you can have project specific python environments using virtualenv. That way you are not putting any python packages in the global area. I knew I wanted to do something similar for managing and installing npm packages. Basically I did not want to install the packages in the global area which could mean I would have to use sudo to install.

Reading up on the internet, I found that npm and node can cause a lot of headache if not setup correctly.

I followed the following links to setup my environment http://www.johnpapa.net/how-to-use-npm-global-without-sudo-on-osx/ https://gist.github.com/DanHerbert/9520689 https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md

Comments