# npm This is just enough info to get you up and running. More info available via `npm help` once it's installed. ## IMPORTANT You need node v0.2.0 or higher to run this program. You shouldn't use sudo with it. ## Simple Install To install npm, do this: curl http://npmjs.org/install.sh | sh If that fails, try this: git clone http://github.com/isaacs/npm.git cd npm make ## Permission Errors If it dies with a "Permission Denied" or EACCESS error, then that probably means that you are running node in a shared root-owned location. You've got options. Using sudo with npm is Very Not Recommended. Anyone can publish anything, and package installations can run arbitrary scripts. ### Option 1: Take ownership Don't do this if you don't know what it does! If you have software in /usr/local that depends on a specific ownership (such as MySQL), then it might break if you change its ownership. Be careful. Unix does not assume you don't know what you're doing! This is convenient if you have a single-user machine. Run this command once, and never use sudo again to install stuff in /usr/local: sudo chown -R $USER /usr/local/{share/man,bin,lib/node} You could also give your user permission to write into that directory by making it group-writable and adding your user to the group that owns it. ### Option 2: Don't leave $HOME Install node in `$HOME/local` and npm will default to living right alongside it. Follow the steps in this gist: ### Option 3: Customize npm to your heart's content Create and edit a file at `~/.npmrc`. This is an ini-formatted file, which you can use to set npm configs. Do something like this to it: cat >>~/.npmrc <