I've been using Node.js + Express + Jade for a long time. Since upgrading to node 0.8.12, the render( ... ) command just times out on my production server.
In this example, "1" is printed to the log, but "2" is not, and the page times out. Of course, I properly have a file called views/test.jade. And, again, this works fine on my test server with the same code...
console.log('1');
res.render('test');
console.log('2');
So I downgraded Node.js back to 0.6.18 (what I was using before) and the code works fine again. But I need the newer node version... the one major difference that I can think of is that 0.6.18 was installed on CentOS via YUM, but I had to make v0.8.12 myself because I could not find an appropriate package.
Here's what I've tried:
Ideas?
Make sure that jade
is correctly installed. If the render call is timing out, it most likely means that an error is being thrown that you are not handling. You can check for errors being thrown like this:
try {
res.render('test');
}
catch (e) {
console.log(e);
}
Since render
doesn't depend on much, I'd guess that the jade
module isn't installed correctly. Make sure that you see jade
in your node_modules\express
folder. If you don't, try re-installing:
npm install express