Running on OSX 10.7 (Lion). Tried including as much detail here. I (foolishly?) decided to upgrade to the latest NODE and NPM. I git-ed and curl-ed like a good boy, and ended up with this:
>node -v
v0.5.9
>npm -v
1.0.99
added export NODE_PATH=/usr/local/lib/node_modules:/usr/local/lib/node
which yields:
>echo $NODE_PATH
/usr/local/lib/node_modules:/usr/local/lib/node
But every require
I have in all my scripts fails in finding any of my modules. It either looks in the local library, or just gives up with an "Error: Cannot find module" message.
I tried variations on the NODE_PATH: with/without the node_modules, with specific directories - nada.
Am I missing some NPM configuration? Am I using it incorrectly? All the scripts worked well prior to the upgrade.
Thanks for any help.
Finally solved it by installing modules locally into the specific node directories.