It breaks, this is output
/root/uptime/node_modules/mongoose/lib/utils.js:413
throw err;
^
TypeError: Cannot read property 'firstTested' of null
at IntervalBuilder.calculateDuration (/root/uptime/lib/intervalBuilder.js:100:44)
at Array.async.auto.duration as 3
at listener (/root/uptime/node_modules/async/lib/async.js:412:46)
at /root/uptime/node_modules/async/lib/async.js:371:17
at Array.forEach (native)
at _forEach (/root/uptime/node_modules/async/lib/async.js:26:24)
at taskComplete (/root/uptime/node_modules/async/lib/async.js:370:13)
at Promise.taskCallback (/root/uptime/node_modules/async/lib/async.js:396:21)
at Promise.
comented out that line exports.tick = function tick (callback) { if ('function' !== typeof callback) return; return function () { try { callback.apply(this, arguments); } catch (err) { // only nextTick on err to get out of // the event loop and avoid state corruption. process.nextTick(function () { //throw err; }); } } } so far so good
agter server rebbot it wont even start even after i reverted that line: node app
module.js:340 throw err; ^ Error: Cannot find module '/root/app' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:901:3