新版本的快递上有一些中间件变化,我在这个问题上围绕其他一些帖子对我的代码进行了一些更改,但我无法坚持下去.
我们手头工作但我不记得改变是什么.
throw new TypeError('Router.use() requires middleware function but got a
^
TypeError: Router.use() requires middleware function but got a Object
Run Code Online (Sandbox Code Playgroud)
node ./bin/www
js-bson: Failed to load c++ bson extension, using pure JS version
js-bson: Failed to load c++ bson extension, using pure JS version
Run Code Online (Sandbox Code Playgroud)
/Users/datis/Documents/bb-dashboard/node_modules/express/lib/router/index.js:438
throw new TypeError('Router.use() requires middleware function but got a
^
TypeError: Router.use() requires middleware function but got a Object
at /Users/datis/Documents/bb-dashboard/node_modules/express/lib/router/index.js:438:13
at Array.forEach (native)
at Function.use (/Users/datis/Documents/bb-dashboard/node_modules/express/lib/router/index.js:436:13)
at /Users/datis/Documents/bb-dashboard/node_modules/express/lib/application.js:188:21
at Array.forEach (native)
at Function.use …Run Code Online (Sandbox Code Playgroud)