node.js - Node js Error: Most middleware (like session) is no longer bundled with Express and must be installed separately -


i have upgraded express version 3 , seeing error in middleware. specifically:

error: middleware (like session) no longer bundled express , must installed separately. please see https://github.com/senchalabs/connect#middleware.

the stack trace is:

at function.object.defineproperty.get (/home/phpsaravana/nodeshop/node_modules/express/lib/express.js:89:13) @ module.exports (/home/phpsaravana/nodeshop/node_modules/connect-mongo/lib/connect-mongo.js:30:39) @ object.<anonymous> (/home/phpsaravana/nodeshop/admin.js:6:42) @ module._compile (module.js:456:26) @ object.module._extensions..js (module.js:474:10) @ module.load (module.js:356:32) @ function.module._load (module.js:312:12) @ function.module.runmain (module.js:497:10) @ startup (node.js:119:16) @ node.js:906:3 

how fix this?

in newer versions of express, middle-wares session not bundled express , if want use them, have install them separately. :

 npm install express-session 

and require :

var session = require('express-session'); ... 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -