twitter / hogan.js

A compiler for the Mustache templating language
http://twitter.github.io/hogan.js
Apache License 2.0
5.14k stars 431 forks source link

problem: missing read template file #207

Closed turbogeek closed 9 years ago

turbogeek commented 9 years ago

I am getting a 'missing read template file' error. The file exists (and all names match), but it seems that the app is not loading the page. Is this an issue with the compiler cache? If so, how do I delete the cache?

missing read template file : /Users/theuserdir/GitHub/Esignature/views/medical_consult_report_review_page.hjs

Error: missing read template file : /Users/theuserdir/GitHub/Esignature/views/medical_consult_report_review_page.hjs at Object.Hogan.fcompile (/Users/theuserdir/GitHub/Esignature/node_modules/hjs/lib/express.js:48:10) at View.Hogan.renderFile as engine at View.render (/Users/theuserdir/GitHub/Esignature/node_modules/express/lib/view.js:76:8) at Function.app.render (/Users/theuserdir/GitHub/Esignature/node_modules/express/lib/application.js:503:10) at ServerResponse.res.render (/Users/theuserdir/GitHub/Esignature/node_modules/express/lib/response.js:802:7) at /Users/theuserdir/GitHub/Esignature/routes/medical_consult_report_review_page.js:14:13 at /Users/theuserdir/GitHub/Esignature/get_consult.js:148:21 at Parser. (/Users/theuserdir/GitHub/Esignature/node_modules/xml2js/lib/xml2js.js:384:20) at Parser.emit (events.js:95:17) at Object.onclosetag (/Users/theuserdir/GitHub/Esignature/node_modules/xml2js/lib/xml2js.js:348:26)

shaoner commented 9 years ago

You can check the parser error by temporarily modifying node_modules/hjs/lib/express.js:48: throw new Error('missing read template file : '+path); into throw error;

It may help.

turbogeek commented 9 years ago

I did find out yesterday that the issue was the parse failing due to a bad piece of template. The code should have passed on that error or at least report it.

agnivade commented 9 years ago

Hey @turbogeek - I am having the same error. I am not sure what the bad piece of template is. Can you tell what was your issue ? I am new to hoganjs and express.