Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

npm development

Arnaud Rinquin edited this page · 7 revisions

This page describes how to set up your environment for npm development.

Here's a way of getting started.

git clone git://github.com/npm/npm.git
cd npm
make link

The npm command will now point to your checked out working copy.

If this does not work for you, try this:

git clone git://github.com/npm/npm.git
cd npm
make uninstall # or sudo make uninstall
make install # or sudo make install
npm link # or sudo npm link

/via dscape

And for developing modules that npm depends on:

19:22 dtrejo: how do you usually develop one of your own modules that npm depends on?                                                        
19:22 dtrejo: (and test that it works w/ npm at the same time)                                                                               
19:27 isaacs: dtrejo: i write a test for it, then i make it pass that test, then i install it in npm and make sure it fixes the bug in npm.  
19:28 isaacs: dtrejo: as if i'm 2 people, one consuming from the other                                                                       
19:28 isaacs: dtrejo: occasinally, i'll just develop it in npm/node_modules first.                                                           
19:28 isaacs: dtrejo: oh, also, i have ~/dev/node_modules where all my node programs live.                                                   
19:28 isaacs: dtrejo: so i can require("foo") any of my things                                                                               

Easy way to set a boolean (e.g. npat=true)

npat will be true:

npm install gss --npat 

Alternatively

npm install gss --npat=true
npm install gss --npat=false

Run the node debugger easily

node debug $(which npm) install gss
Something went wrong with that request. Please try again.