I got a weird issues when trying to render an .ejs file at this specific lines
TypeError: /home/me/nodeapp/app/views/default/page/connection.ejs:66
I don't have reputation to comment so .... I just saw the same symptom. In my case I accidentally changed "currentUser.name" to "currentUser.Name" (uppercase "N") from a sample in the book "Express In Action", section 8.
in routes.js
var passport = require( "passport" );
router.use( function( req, res, next ) {
res.locals.currentUser = req.user;
}
views/_header.ejs
Hello <%= currentUser.Name() %>
when I changed back to "currentUser.name" the TypeError disappeared