CNode

Error: 'app.router' is deprecated!

问答
Jjava-jixiang发布于10 年前最后回复10 年前1 回复6250 浏览0 收藏

Error: 'app.router' is deprecated! Please see the 3.x to 4.x migration guide for details on how to update your app. at EventEmitter.Object.defineProperty.get (c:\Users\One\WebstormProjects\canku\node_modules\express\lib\application.js:123:13) at Object. (c:\Users\One\WebstormProjects\canku\app.js:54:12) at Module._compile (module.js:434:26) at Object.Module._extensions..js (module.js:452:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:475:10) at startup (node.js:117:18) at node.js:951:3

查看回复

回复 (1)

I
i5ting#1·10 年前

你用的express4,但代码里的路由写法是express3的

参与回复
登录后即可参与回复。登录