title: Vash view engine gives always an error when rendering using nodejs & express 3
body: <p>I'm using the view engine <a href="https://github.com/kirbysayshi/vash" rel="nofollow noreferrer">vash</a> with nodejs &amp; express 3 and my index.vash and layout are looking as follows:</p>
  
  <pre><code>// index.vash
  @html.extend('layout', function(model){
      @html.block('body', function(model){
          &lt;span class="name"&gt;Welcome&lt;/span&gt;
      })
  })
  
  // layout.vash
  &lt;p&gt;
      @html.block('body')
  &lt;/p&gt;
  </code></pre>
  
  <p>app.js:</p>
  
  <pre><code>app.get('/', function (req, res) {
      res.render('index');
  });
  </code></pre>
  
  <p>In app.js I set the view engine: <code>app.set('view engine', 'vash');</code>
  So these examples are 1:1 the same as described on github. </p>
  
  <p><a href="https://stackoverflow.com/questions/23407173/node-js-rendering-error-with-vash">This</a> question is the same, except that the solution didn't work for me. He suggests that you should give the correct path to layout.vash, but I got the two vash files (index &amp; layout) in the same directory 'views'. I also tried <code>@html.extend('views/layout'..</code> but that didn't work either.</p>
  
  <p>Every time I run the project it displays the following error for index.vash:</p>
  
  <blockquote>
    <p>Express<br>
      500 TypeError: Problem while rendering template at line 5, character 1.<br />
      Original message: object is not a function.<br />
      Context:
      <br />
      <br />
      3 | @html.block('body', function(model){<br />
      4 | Welcome<br />
      -> 5 | })<br />
      6 | })<br />
      <br />
      at C:\Users\Luca\Documents\VSProjects\Website\TestApp\TestApp\node_modules\vash\build\vash.js:2213:4
      at Object.vash.loadFile (C:\Users\Luca\Documents\VSProjects\Website\TestApp\TestApp\node_modules\vash\build\vash.js:2072:10)
      at helpers.extend (C:\Users\Luca\Documents\VSProjects\Website\TestApp\TestApp\node_modules\vash\build\vash.js:2190:8)
      at eval (eval at (C:\Users\Luca\Documents\VSProjects\Website\TestApp\TestApp\node_modules\vash\build\vash.js:1820:24), :17:21)
      at linked (C:\Users\Luca\Documents\VSProjects\Website\TestApp\TestApp\node_modules\vash\build\vash.js:1860:12)
      at C:\Users\Luca\Documents\VSProjects\Website\TestApp\TestApp\node_modules\vash\build\vash.js:2082:21
      at Object.vash.loadFile (C:\Users\Luca\Documents\VSProjects\Website\TestApp\TestApp\node_modules\vash\build\vash.js:2070:10)
      at View.vash.renderFile [as engine] (C:\Users\Luca\Documents\VSProjects\Website\TestApp\TestApp\node_modules\vash\build\vash.js:2078:8)
      at View.render (C:\Users\Luca\Documents\VSProjects\Website\TestApp\TestApp\node_modules\express\lib\view.js:76:8)
      at Function.app.render (C:\Users\Luca\Documents\VSProjects\Website\TestApp\TestApp\node_modules\express\lib\application.js:504:10)</p>
  </blockquote>