I'm trying to use Express in node, install everything okay, compiled, got npm and installed express with:
npm install express
The problem is, everytime I try to "require" it, it gives me an error!
Take a look, a simple file app.js as:
var express = require('express');
When I run it:
tlab065:~/proj/Express-server-abstraction> node app.js
node.js:116
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Cannot read property 'prototype' of undefined
at Object.<anonymous> (/people/home/jdomingues/local/node/lib/node/.npm/express/1.0.7/package/lib/express/server.js:87:44)
at Module._compile (module.js:373:26)
at Object..js (module.js:379:10)
at Module.load (module.js:305:31)
at Function._load (module.js:271:10)
at require (module.js:317:19)
at Object.<anonymous> (/people/home/jdomingues/local/node/lib/node/.npm/express/1.0.7/package/lib/express/index.js:28:31)
at Module._compile (module.js:373:26)
at Object..js (module.js:379:10)
at Module.load (module.js:305:31
Can someone help me? Why am I getting this error? How can I maybe install a different version from express?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…