我写的代码放到bae里每次访问都有这个错误,大家帮忙看下什么原因。困扰我好久了。
TypeError: Cannot call method 'write' of undefined
at ServerResponse.module.exports.res.end (instance1/nodejs/***.duapp.com/app/node_modules/express/node_modules/connect/lib/middleware/logger.js:151:16)
at ServerResponse.res.send (instance1/nodejs/***.duapp.com/app/node_modules/express/lib/response.js:149:8)
at module.exports (instance1/nodejs/***.duapp.com/app/routes/index.js:121:25)
at Weixin.ResponseMessage (instance1/nodejs/***.duapp.com/app/models/weixin.js:50:9)
at Parser.exports.Parser.Parser.parseString (instance1/nodejs/***.duapp.com/app/node_modules/xml2js/lib/xml2js.js:255:20)
at Parser.EventEmitter.emit (events.js:96:17)
at Object.exports.Parser.Parser.reset.saxParser.onclosetag (instance1/nodejs/***.duapp.com/app/node_modules/xml2js/lib/xml2js.js:225:24)
at emit (instance1/nodejs/***.duapp.com/app/node_modules/xml2js/node_modules/sax/lib/sax.js:602:33)
at emitNode (instance1/nodejs/***.duapp.com/app/node_modules/xml2js/node_modules/sax/lib/sax.js:607:3)
at closeTag (instance1/nodejs/***.duapp.com/app/node_modules/xml2js/node_modules/sax/lib/sax.js:848:5)