rabbitpubsub
rabbitpubsub copied to clipboard
Can not deploy on a standalone setup.
Hi, I tried setting this up on a local machine and not cloud foundry and started getting multiple errors.
throw new TypeError('The super constructor to `inherits` must not ' +
^
TypeError: The super constructor to `inherits` must not be null or undefined.
at Object.exports.inherits (util.js:756:11)
at module.exports (/home/thor/experiments/rabbitpubsub/node_modules/connect-redis/lib/connect-redis.js:116:8)
at Object.<anonymous> (/home/thor/experiments/rabbitpubsub/app.js:33:42)
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 Function.Module.runMain (module.js:467:10)
at startup (node.js:134:18)
at node.js:961:3
I encounter the same problem. Could you solve it?
Did anyone solve this? Having this issue right now...
var express = require('express');
var RedisStore = require('connect-redis')(express);
app.use(session({
secret: 'dummy',
store: new RedisStore({
host: '127.0.0.1',
port: 6379,
client: redis
}),
saveUninitialized: false,
resave: false
}));
And I get this when initializing the server:
util.js:965
throw new TypeError('The super constructor to "inherits" must not ' +
^
TypeError: The super constructor to "inherits" must not be null or undefined
at Object.exports.inherits (util.js:965:11)
at module.exports (/Users/vdek/Desktop/Project/MB/node_modules/connect-redis/lib/connect-redis.js:130:8)
at Object.<anonymous> (/Users/vdek/Desktop/Project/MB/server.js:22:42)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
EDIT:
My error was calling var RedisStore = require('connect-redis')(express);
with express.
I didn't pay attention, you had to call it with session. Like this:
var session = require('express-session');
var RedisStore = require('connect-redis')(session);
not working properly