1

While running my server using nodeJs express, I go below error:

express-session deprecated undefined resave option; provide resave option server.js:16:9
express-session deprecated undefined saveUninitialized option; provide saveUninitialized option server.js:16:9
C:\openshift\nodejs\node_modules\express\lib\router\index.js:291
    throw new Error(msg);
          ^
Error: .get() requires callback functions but got a [object Undefined]
    at C:\openshift\nodejs\node_modules\express\lib\router\index.js:291:11
    at Array.forEach (native)
    at Router.route (C:\openshift\nodejs\node_modules\express\lib\router\index.js:287:13)
    at Router.(anonymous function) [as get] (C:\openshift\nodejs\node_modules\express\lib\router\index.js:318:16)
    at Function.app.(anonymous function) (C:\openshift\nodejs\node_modules\express\lib\application.js:412:26)
    at Object.<anonymous> (C:\openshift\nodejs\server.js:31:5)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
PS C:\openshift\nodejs>

How can I resolve this?

1 Answer 1

1

What you're trying to pass to the #get method is out of scope and therefore is undefined hence the [object Undefined].

Post your code and it'll be easier to help you out.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.