I have the following error while trying to start my node app:
TypeError: Cannot read property 'prototype' of undefined
Full error:
at Object.<anonymous> (/home/node/node_modules/express/lib/express/server.js:87:44)
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 Module.require (module.js:357:17)
at require (module.js:368:17)
at Object.<anonymous> (/home/node/node_modules/express/lib/express/index.js:28:31)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
I have noted this previous question on the same error: Express framework giving a very strange error. I tried to install the older version of connect, but this did not work and I received the same error.
Node version: v0.5.9-pre
I solved this by starting from scratch and re-installing node again with an older version 0.4.8.