尝试启动节点服务器时出现以下错误。看起来它与使用节点包管理器(npm)安装的组合处理程序有关。
有人可以帮忙吗?
TypeError: Object function app(req, res){ app.handle(req, res); } has no method 'error'
at /Repository/combo/node_modules/combohandler/lib/server.js:23:9
at Object.<anonymous> (/Repository/combo/server.js:8:7)
at Module._compile (module.js:446:26)
at Object..js (module.js:464:10)
at Module.load (module.js:353:31)
at Function._load (module.js:311:12)
at Array.0 (module.js:484:10)
at EventEmitter._tickCallback (node.js:190:38)
下面你可以看到我正在使用的 express 版本:
Brendans-MacBook-Pro:combo brendan_rice$ npm view express version
npm WARN express@1.0.4 package.json: 'modules' object is deprecated
npm WARN express@1.0.5 package.json: 'modules' object is deprecated
npm WARN express@1.0.6 package.json: 'modules' object is deprecated
npm WARN express@1.0.7 package.json: 'modules' object is deprecated
3.0.0rc1