-
Notifications
You must be signed in to change notification settings - Fork 6
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
use jinjs with express, errors occured #21
Comments
Can you give me a way to reproduce the error so that I can look into it ? |
I modify the lib/express.js at the line 34 as res = expressEnvironment.superclass.prototype.getTemplateFromString.call(this, str, ctx); the original is : res = ExpressEnvironment.superclass.prototype.getTemplateFromString.call.call(this, this, str, ctx); the same as lib/express.js line 23: return ExpressEnvironment.superclass.prototype.trackFile.call(this, path); all is OK!! The way is following your guide: and my express config is that: and I DON'T use precompiling with pwilang, because if use, it issued some other bug as followings: layout.html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> and the css style part in the ultimate rendered page will be like this: <style type="text/css"> .... when I disable pre-compiling, the problem gone! |
I'm going to remove the pwilang precompilation entirely, as it obviously only is confusing... |
Latest version should work. |
OK, thanks. All work now. This issue can be closed |
500 TypeError: object is not a function
at ExpressEnvironment.CALL_NON_FUNCTION (native)
at ExpressEnvironment.getTemplateFromString (/usr/local/lib/node_modules/jinjs/lib/express.js:34:82)
at Object.compile (/usr/local/lib/node_modules/jinjs/lib/express.js:64:45)
at Function.compile (/usr/local/lib/node_modules/locomotive/node_modules/express/lib/view.js:68:33)
at ServerResponse._render (/usr/local/lib/node_modules/locomotive/node_modules/express/lib/view.js:417:18)
at ServerResponse.render (/usr/local/lib/node_modules/locomotive/node_modules/express/lib/view.js:318:17)
who can explain that?
Jinjs: 0.3.5
Express: 2.5.6
Node: 0.6.7
OS: Debian
The text was updated successfully, but these errors were encountered: