jqtpl view caching and express

38 views
Skip to first unread message

Rakesh Pai

unread,
May 12, 2011, 1:04:03 AM5/12/11
to expre...@googlegroups.com
When I run my express in development (default) mode, everything works
fine. However, in production mode, I get an error saying that express
can't find the "compile" method.

Connect
500 TypeError: Object # has no method 'compile'
at ServerResponse.render
(/path/to/project/node_modules/express/lib/view.js:320:58)

I've tried this with jq...@1.0.0 and jq...@1.0.4 and I get the same
results in both versions.

I'm using sudo NODE_ENV=production node app.js to start the app.

The following is my app configuration:
app.set('view engine', 'html');
app.register(".html", require("jqtpl"));
app.configure('production', function() {
//app.use(express.errorHandler());
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));

app.port = 80;
});

(I had added the dumpExceptions and showStack to see the errors)

I'm guessing this is a problem with jqtpl and not express, but I know
that the jqtpl folks hang out here as well, so I thought I'd post this
here.

Any help will be awesome.

--
Rakesh Pai
Mumbai, India.
http://rakeshpai.me/
http://twitter.com/rakesh314
http://www.google.com/profiles/rakeshpai

Rakesh Pai

unread,
May 12, 2011, 5:30:57 AM5/12/11
to expre...@googlegroups.com
Ah. Nevermind. It was a case of PEBCAK.

I upgraded by express to 2.3.4 and jqtpl to 1.0.4, and everything's
working fine.

Reply all
Reply to author
Forward
0 new messages