Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Failed to load template/Error: Failed to lookup view "500" with Expressjs framework #2

Closed
Mirodil opened this issue Oct 6, 2012 · 1 comment

Comments

@Mirodil
Copy link

Mirodil commented Oct 6, 2012

i tred to used this tempate engine with expressjs framework.
if i use temaplet with out layout it works. E.g

<div>Hello, World!</div>

if i use with layout it thorw exception. E.g

<% extend 'layout' %>
<div>Hello, World!</div>

Here is error:
Error: Failed to load template D:\Mirodil\Dropbox\justdoit\bigshop\views
D:\Mirodil\Dropbox\justdoit\bigshop\views\index.ect
at read (C:\Program Files\nodejs\node_modules\ect\lib\ect.js:245:13)

The problem in the rendering, expressjs pass full path of themplate file and in the tempate it render without any error if in this tempate does not contanins any referens to other templates.

@baryshev
Copy link
Owner

baryshev commented Oct 6, 2012

Fixed in version 0.3.2

Use root option to set templates root folder. Also you need to pass template name with extension to layout or include function in your templates. ext option not working with express at this moment.

Check With express section in README.md

@baryshev baryshev closed this as completed Oct 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants