ericf / express-handlebars

A Handlebars view engine for Express which doesn't suck.
BSD 3-Clause "New" or "Revised" License
2.31k stars 384 forks source link

Change to defaultLayout can give v3.1.0 ENOENT main.handlebars #252

Open aubergene opened 5 years ago

aubergene commented 5 years ago

Previously we hadn't specified layout: false and so it started looking for main.handlebars giving a ENOENT error. This was unexpected and probably shouldn't have be a minor version bump.

The change to the defaults was in #249

Creating this issue just so other people can find it if they encounter the same problem. We fixed it by adding layout: false to the handlebars options.

amypellegrini commented 5 years ago

I'm having the same issue but setting layout to false is not fixing it. Any ideas?

This issue seems to be a duplicate of #253 where I posted the same question.

donmccurdy commented 5 years ago

Agreed that per https://semver.org/, this should have been a major version bump. Thanks for creating the issue to track this.

@amypellegrini using layout:false did fix the issue for me. From #253 it looks like your issue was solved?

amypellegrini commented 5 years ago

@donmccurdy Yes, I've fix the issue by setting layoutto false. My previous comment refers to some difficulty I encountered trying to implement the fix, as it wasn't evident for me how this setting was used.