I get this weird error when I add a route '/client' in Railway.js:
500 ReferenceError: jade is not defined
I get this for any valid route in my app, not only '/client'. This line seems to be added to the top of my Jade compiled templates, and is what causes the exception:
var attrs = jade.attrs, escape = jade.escape, rethrow = jade.rethrow;
It is not present in the compiled templates unless I define a route do '/client'.
'/client/:id?', '/clients', everything else works, only '/client'.
Anyone has a clue?
I had this exact same error when I was working on an ExpressJS app using jade templates. I figured out it was only happening on pages where I passed a local variable named
client
. E.g.I think
client
is a reserved word when rendering jade files (or maybe something else, I'm still kinda new to Node.js). I was able to fix it by changing it to this: