You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CODE
/**
* Module dependencies.
*/
var app = require('../app');
var debug = require('debug')('productiondisplaynodejs:server');
var http = require('http');
var socketSession = require("socket.io-session-middleware");
var MemoryStore = require('session-memory-store')(app);
// Create Session To use With Socket.io ***********
var session = {
store: new MemoryStore(),
secret: "secret",
key: "mykey.sid",
cookieParser: connect.cookieParser("secret")
};`
EXCEPTION
var Store = express.Store || express.session.Store;
^
TypeError: Cannot read property 'Store' of undefined
at module.exports (C:\Users\Administrator\IdeaProjects\ProductionDisplayNodejs\node_modules\session-memory-store\lib\memoryStore.js:19:47)
at Object. (C:\Users\Administrator\IdeaProjects\ProductionDisplayNodejs\bin\www:12:50)
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:389:7)
at startup (bootstrap_node.js:149:9)
Process finished with exit code 1
The text was updated successfully, but these errors were encountered:
Hey @thetechguy2016. We haven't used this module for quite some time now and it is out of date. You might be able to port it to the most recent express and socket.io versions.
Hi @meaku thanks for your reply, and apologize for the late reply, the socket.io version (2.0.2) , please let me know to create session with socket.io i tried many module's but none of them work properly . if you can help me ,it will be great full for me.
EXCEPTION
var Store = express.Store || express.session.Store;
^
TypeError: Cannot read property 'Store' of undefined
at module.exports (C:\Users\Administrator\IdeaProjects\ProductionDisplayNodejs\node_modules\session-memory-store\lib\memoryStore.js:19:47)
at Object. (C:\Users\Administrator\IdeaProjects\ProductionDisplayNodejs\bin\www:12:50)
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:389:7)
at startup (bootstrap_node.js:149:9)
Process finished with exit code 1
The text was updated successfully, but these errors were encountered: