The staging instance of my webapp is throwing an error:
Express
500 TypeError: Object #<EventEmitter> has no method 'hrtime'
at Object.logger [as handle] (F:\approot\node_modules\express\node_modules\connect\node_modules\morgan\index.js:96:28)
at next (F:\approot\node_modules\express\node_modules\connect\lib\proto.js:169:15)
at Object.favicon [as handle] (F:\approot\node_modules\express\node_modules\connect\node_modules\serve-favicon\index.js:54:44)
at next (F:\approot\node_modules\express\node_modules\connect\lib\proto.js:169:15)
at Object.expressInit [as handle] (F:\approot\node_modules\express\lib\middleware.js:30:5)
at next (F:\approot\node_modules\express\node_modules\connect\lib\proto.js:169:15)
at Object.query [as handle] (F:\approot\node_modules\express\node_modules\connect\lib\middleware\query.js:43:5)
at next (F:\approot\node_modules\express\node_modules\connect\lib\proto.js:169:15)
at Function.handle (F:\approot\node_modules\express\node_modules\connect\lib\proto.js:177:3)
at Server.app (F:\approot\node_modules\express\node_modules\connect\lib\connect.js:66:37)
Line 96 in morgan/index.js:
req._startAt = process.hrtime();
This only happens on the copy we've deployed to Azure. We are able to run the Express server through node directly on the machine, and everything seems to work perfectly.
We just started having this problem with the most recent deployment. Any idea where to start looking? I can't find any similar issues searching Github issues for Express or Morgan. Google also isn't helping.
process.hrtime() only exists in node v0.8.x and newer. So you will need to upgrade to a newer version of node (the latest stable version being preferable) somehow.