我正在尝试在节点中使用 Express,安装一切正常,编译,获得 npm 并安装 express:
npm 安装快递
问题是,每次我尝试“要求”它时,它都会给我一个错误!看一下,一个简单的文件 app.js 为:
var express = require('express');
当我运行它时:
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
有人能帮我吗?为什么我会收到此错误?我怎样才能安装与 express 不同的版本?