Error: 'app.router' is deprecated!
发布于 9 年前 作者 java-jixiang 5619 次浏览 最后一次编辑是 8 年前 来自 问答

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.<anonymous> (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 回复

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

回到顶部