启动应用程序时plunker node js jitsu错误

时间:2013-11-12 05:16:21

标签: node.js coffeescript nodejitsu iced-coffeescript plunker

我在启动jitsu服务器时遇到错误。

请指导我

{"message":"Object #<ServerResponse> has no method 'local'","code":500}


err Mon, 11 Nov 2013 13:13:09 GMT TypeError: Object # has no method 'local'
at Object.module.exports.middleware [as handle]
(/opt/run/snapshot/package/servers/www/middleware/expose.coffee:3:5)
at next (/opt/run/snapshot/package/node_modules/express/node_modules/connect/lib/proto.js:193:15)
at multipart (/opt/run/snapshot/package/node_modules/express/node_modules/connect/lib/middleware/multipart.js:90:37)
at module.exports
(/opt/run/snapshot/package/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:57:9)
at urlencoded (/opt/run/snapshot/package/node_modules/express/node_modules/connect/lib/middleware/urlencoded.js:49:37)
at module.exports
(/opt/run/snapshot/package/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:55:7)
at json (/opt/run/snapshot/package/node_modules/express/node_modules/connect/lib/middleware/json.js:51:37)
at Object.bodyParser [as handle]
(/opt/run/snapshot/package/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:53:5)
at next (/opt/run/snapshot/package/node_modules/express/node_modules/connect/lib/proto.js:193:15)
at Object.cookieParser [as handle]
(/opt/run/snapshot/package/node_modules/express/node_modules/connect/lib/middleware/cookieParser.js:60:5)
at next (/opt/run/snapshot/package/node_modules/express/node_modules/connect/lib/proto.js:193:15)
at Object.exports.send [as oncomplete]
(/opt/run/snapshot/package/node_modules/connect/lib/middleware/static.js:139:11)

1 个答案:

答案 0 :(得分:0)

您希望res.locals复数)而不是res.local

因为@Marco还不够清楚,

  • 在文字编辑器中打开expose.coffee
  • 在第3行,将“local”改为“locals”
  • 保存并重试