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:
- Upgrading express (@3.0.0rc5) and jade (@0.26.3)
- Using a callback in the render() func (it is never called)
- Explicitly setting the views/ directory via app.set(‘views’, absolute_path);
- Using an invalid template name intentionally in attempts to get an error. Still, nothing (no callback fired, no execution)
- Crying
Ideas?
Make sure that
jadeis 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:Since
renderdoesn’t depend on much, I’d guess that thejademodule isn’t installed correctly. Make sure that you seejadein yournode_modules\expressfolder. If you don’t, try re-installing: