为了账号安全,请及时绑定邮箱和手机立即绑定

运行整理代码报错 Route.get() requires a callback function but got a [object Undefined]

D:\movie-test\node_modules\express\lib\router\route.js:202

        throw new Error(msg);

        ^


Error: Route.get() requires a callback function but got a [object Undefined]

    at Route.(anonymous function) [as get] (D:\movie-test\node_modules\express\lib\router\route.js:202:15)

    at Function.app.(anonymous function) [as get] (D:\movie-test\node_modules\express\lib\application.js:482:19)

    at module.exports (D:\movie-test\config\routes.js:22:13)

    at Object.<anonymous> (D:\movie-test\app.js:36:27)

    at Module._compile (module.js:652:30)

    at Object.Module._extensions..js (module.js:663:10)

    at Module.load (module.js:565:32)

    at tryModuleLoad (module.js:505:12)

    at Function.Module._load (module.js:497:3)

    at Function.Module.runMain (module.js:693:10)

    at startup (bootstrap_node.js:188:16)

    at bootstrap_node.js:609:3


正在回答

1 回答

routes.js Userlist路由写错了

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
node建站攻略(二期)——网站升级
  • 参与学习       51940    人
  • 解答问题       408    个

帮助你深入前后端开发留下的迷惑,为进一步自学打下基础

进入课程

运行整理代码报错 Route.get() requires a callback function but got a [object Undefined]

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信