Mongoose 如何纠正以下错误

Mongoose 如何纠正以下错误,mongoose,mean-stack,Mongoose,Mean Stack,我正在关注这一点。当我试图编译相同的代码时。我得到了下面的错误。我不能理解这种错误 C:\MyPolls>node app.js C:\MyPolls\node_modules\express\lib\router\index.js:291 throw new Error(msg); ^ Error: .get() requires callback functions but got a [object Undefined] at C:\MyPolls\node_

我正在关注这一点。当我试图编译相同的代码时。我得到了下面的错误。我不能理解这种错误

C:\MyPolls>node app.js

C:\MyPolls\node_modules\express\lib\router\index.js:291
   throw new Error(msg);
      ^
Error: .get() requires callback functions but got a [object Undefined]
  at C:\MyPolls\node_modules\express\lib\router\index.js:291:11
  at Array.forEach (native)
  at Router.route (C:\MyPolls\node_modules\express\lib\router\index.js:287:13)

  at Router.(anonymous function) [as get] (C:\MyPolls\node_modules\express\lib
    \router\index.js:318:16)
  at Function.app.(anonymous function) [as get] (C:\MyPolls\node_modules\expre
    ss\lib\application.js:412:26)
  at Object.<anonymous> (C:\MyPolls\app.js:35:5)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
.get()需要回调函数,但得到了一个[object Undefined]意味着

您有一条定义如下的路线 app.get('/polls/polls',routes.list

但是routes.list未定义

所以我想 1.您没有在定义app.get的文件中添加require('routes')。 2.或者您没有实现routes.list回调

不幸的是,我无法从链接下载教程。
你能把它放在dropbox之类的地方并与大家分享吗。

最后,我理解了这个问题,并且已经纠正了它。问题的原因是下面的代码行

 app.get('/users', user.list);
当我开始编辑mean stack项目时,我已经删除了项目目录中的user.js文件,但我忘记删除app.js文件中的上述代码行。
谢谢大家的回复

您能否编辑您的问题,将第35行的
C:\MyPolls\app.js
代码包含在内?我已经包含了app.js文件。看一下这段代码。我已经添加了require('routes')。我已经在那里更新了我的问题,包括app.js文件。请查看问题一次。
 app.get('/users', user.list);