Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not deploy on a standalone setup. #4

Open
shivendrasoni opened this issue Oct 25, 2015 · 3 comments
Open

Can not deploy on a standalone setup. #4

shivendrasoni opened this issue Oct 25, 2015 · 3 comments

Comments

@shivendrasoni
Copy link

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
@yusong-shen
Copy link

I encounter the same problem. Could you solve it?

@santiagovdk
Copy link

santiagovdk commented Dec 3, 2016

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);

@iamnizzam
Copy link

not working properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants