isaacs/npm — Issue #1526: Cannot find module 'connect'.
Author: vmrathod
Created: 2011-10-10 14:19:43+00:00
State: open

Below is my npm installation list
/usr/bin
├─┬ connect@1.7.1
│ ├── mime@1.2.4
│ └── qs@0.3.1
├─┬ npm@1.0.6
│ ├── abbrev@1.0.3
│ ├── node-uuid@1.1.0
│ ├── nopt@1.0.4
│ └── semver@1.0.5
└─┬ socket.io@0.7.7
├── bison@1.1.1 extra
├── policyfile@0.0.3
├── redis@0.6.0
└─┬ socket.io-client@0
└── uglify-js@1.0.3

---------
My Node.js version

D:\project\nodejs>node -v
v0.5.8
---------
D:\project\nodejs>node connectServer.js

When i am trying to run above command it is giving me below error. but when i moved my connectSever.js file to "bin" folder then it's wroking. Can anybody help me to run connectServer.js outside of bin folder.
node.js:207
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module 'connect'
at Function._resolveFilename (module.js:334:11)
at Function._load (module.js:279:25)
at Module.require (module.js:357:17)
at require (module.js:368:17)
at Object. (D:\project\nodejs\connectServer.js:1:75)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Array. (module.js:470:10)