我在 server.js 中收到以下错误:
TypeError: routing is not a function
上
routing(app);
路由.js:
// JavaScript source code
var friends = require('./../controllers/friends.js');
module.export = function(app)
{...}
这很简单,您只是以错误的方式导出它(错别字)。您应该改写module.exports
。你得到的结果表明你调用这个模块的其他模块找不到它(你使用了带来你的函数undefined
,然后你尝试调用一些不是函数而只是undefined
值的东西:
// JavaScript source code
var friends = require('./../controllers/friends.js');
module.exports = function(app)
{...}
有关用法,请在此处获取信息:
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句