Add
export NODE_PATH=...
to your system environment setting (/etc/profile,~/.bash_profile...), make it works.
or
You can declare dependencies in package.json(project), like this:
{
...
"dependencies": {
"connect": "~2.0.3",
...
},
...
}
and run
npm install
in the same folder instead. Hope it helps.