问题出在哪里?错误:Route.get()需要回调函数,但得到了[对象未定义]

错误:Route.get()需要回调函数,但得到了[对象未定义] 我尝试在VS代码上运行该应用程序,但收到此消息

/home/unkown/Node/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.<computed> [as get] (/home/unkown/Node/node_modules/express/lib/router/route.js:202:15)

我更新到最新版本的程序包并重新启动端口,但仍然请向我显示此错误。 到底在哪里?请 我的密码

节点/ app.js

const express = require('express');
const path = require('path');
const logger = require('morgan');
const cookieParser = require('cookie-parser');
const bodyParser = require('body-parser');

const index = require('./app_server/routes/index');

const app = express();

// view engine setup
app.set('views', path.join(__dirname, 'app_server', 'views'));
app.set('view engine', 'pug');

// uncomment after placing your favicon in /public
//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));

app.use('/', index);
app.use('/users', users);

// catch 404 and forward to error handler
app.use(function(req, res, next) {
  const err = new Error('Not Found');
  err.status = 404;
  next(err);
});

// error handler
app.use(function(err, req, res, next) {
  // set locals, only providing error in development
  res.locals.message = err.message;
  res.locals.error = req.app.get('env') === 'development' ? err : {};

  // render the error page
  res.status(err.status || 500);
  res.render('error');
});

module.exports = app; 

节点/app_server/controllers/locations.js

    /* GET 'home' page */
const homeList = (res, req)=>{
  res.render('index', {title: 'Home'})
};

/* GET 'Location info' page */
const locationInfo = (res, req)=>{
    res.render('index', {title: 'Location Info'})
  };

/* GET 'Add review' page */
const addReview = (res, req)=>{
    res.render('index', {title: 'Add Review'})
  };

  module.exports = {
    homeList,
    locationInfo,
    addReview
  };

节点/ app_server /路由器/index.js

const express = require('express');
const router = express.Router();
const ctrlLocations = require('../controllers/locations');
const ctrlOthers = require('../controllers/others');

/* Locations pages */
router.get('/', ctrlLocations.homelist);
router.get('/location', ctrlLocations.locationInfo);
router.get('/location/review/new', ctrlLocations.addReview);

/* Other pages */
router.get('/about', ctrlOthers.about);

module.exports = router;