TypeError: Cannot Read Property 'handle' Of Undefined --- If (fn.handle && Fn.set) Mount_app = Fn
I would appreciate some help with this please. Not certain exactly sure what to this means as this is my first time working with node and express. I set up express to use with node
Solution 1:
The problem is that you're trying to use()
a variable that isn't defined yet. If you use the function logErrors(err, req, res, next) {
syntax instead of var logErrors=function (err, req, res, next) {
, your TypeErrors should go away.
Solution 2:
Try to move var clientErrorHandler, errorHandler and etc before your call app.use for this.
Like:
var errorHandler = function (req, res, next) { .... }
app.use(errorHandler);
Solution 3:
Thanks i also had the same issue i was using doing this
app.use(__dirname+'path');
Instead of doing
app.use(express.static(__dirname+'/path'));
Agh ! small little typos .
Post a Comment for "TypeError: Cannot Read Property 'handle' Of Undefined --- If (fn.handle && Fn.set) Mount_app = Fn"