文件:
所以我添加了一个护照登录方法,app.js中有以下代码段
require('./config/passport')(passport);
但是我遇到了以下错误,甚至在谷歌搜索后我也不知道是什么导致它出现:
nodemon
[nodemon] 1.17.3
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node server.js`
express-session deprecated undefined resave option; provide resave option app.js:30:9express-session deprecated undefined saveUninitialized option; provide saveUninitialized option app.js:30:9
B:\Shall\Practice\tryBlog\node_modules\express\lib\router\index.js:140
var search = 1 + req.url.indexOf('?');
^
TypeError: Cannot read property 'indexOf' of undefined
at Function.handle (B:\Shall\Practice\tryBlog\node_modules\express\lib\router\index.js:140:28)
at router (B:\Shall\Practice\tryBlog\node_modules\express\lib\router\index.js:46:12)
at Object.<anonymous> (B:\Shall\Practice\tryBlog\app.js:38:28)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (B:\Shall\Practice\tryBlog\server.js:2:13)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
[nodemon] app crashed - waiting for file changes before starting...
我应该知道要解决这个问题?