我正在开发一个mean.io应用程序.我试图在永远的节点模块的Ubuntu
shell上运行这个应用程序,但它抛出一个错误
"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)
“
解决方法
我遇到了同样的问题.这是因为使用Redistore具有“express”参数
var RedisStore = require('connect-redis')(express);
最后我使用session作为参数修复它.
var session = require('express-session'); var RedisStore = require('connect-redis')(session);
希望它能帮到你.