问题
I am working on a mean.io application. I am trying to run this application on Ubuntu shell with forever module of node but it is throwing an error
"util.js:756
throw new TypeError('The super constructor to `inherits` must not ' +
^: The super constructor to `inherits` must not be null or undefined.
at Object.exports.inherits (util.js:756:11)
at Object.<anonymous> (/usr/lib/node_modules/forever/node_modules/forever-monitor/lib/forever-monitor/monitor.js:142:7)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/usr/lib/node_modules/forever/node_modules/forever-monitor/lib/index.js:14:24)
at Module._compile (module.js:435:26)
"
Can anyone help on this what is the actual issue,how i can resolve this error.
回答1:
I have faced the same issue. It was due to using Redistore with "express" parameter
var RedisStore = require('connect-redis')(express);
finally I fixed it using a session as parameter.
var session = require('express-session');
var RedisStore = require('connect-redis')(session);
Hope it helps you.
来源:https://stackoverflow.com/questions/33260433/mean-io-application-is-throwing-error-with-forever