Error: Route.get() requires a callback function
I´m getting
Error: Route.get() requires a callback function but got a [object Undefined]
This is my route file:
var express = require("express");
var app = express();
var router = express.Router();
var ctrlLocations = require('../controllers/locations');
var ctrlReviews = require('../controllers/reviews');
/**Locations*/
/*router.get('/locations', ctrlLocations.locationsListByDistante);
*/
router.post('/locations', ctrlLocations.locationsCreate);
router.get('/locations/:locationid', ctrlLocations.locationsReadOne);
module.exports = router;
Error LOG:
Error: Route.get() requires a callback function but got a [object Undefined] at Route.(anonymous function) [as get] (C:UsersPaiDesktopmeannode_modulesexpresslibrouterroute.js:202:15) at Function.proto.(anonymous function) [as get] (C:UsersPaiDesktopmeannode_modulesexpresslibrouterindex.js:510:19) at Object. (C:UsersPaiDesktopmeanapp_apiroutesindex.js:14:12) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:UsersPaiDesktopmeanapp.js:22:17) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)
链接地址: http://www.djcxy.com/p/33034.html上一篇: 我试图从面向下面的错误的节点连接到oracledb
下一篇: 错误:Route.get()需要回调函数