Answer the question
In order to leave comments, you need to log in
Another error in node, how to fix it?
I 'm learning from this screencast , as in the screencast, I do require('routes')(app);
it like this, I do it in routes/index.js module.esports = function (app) {...}
, I connect, I get an error
require('routes')(app);
^
TypeError: require(...) is not a function
at Object.<anonymous> (/var/www/html/chatnode/app.js:24:18)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question