Node.js - throw new Error("Cannot find module '" + request + "'");

What does this mean?

throw new Error("Cannot find module '" + request + "'");

When I install a package and I incude I get that error! Why?

I am usig express.

e.g.

npm install -g moment

m = require('moment');

If you want to use it in a script, you have to install it locally. If you want to use it in a shell, install it globally.

http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/

Basically, run npm install moment without the -g flag and it will work.