Reputation: 58521
contents of: file.js
var jade;
jade = require('jade');
console.log(jade.render("!!! 5"));
on the shell:
$ node file.js
produces this error:
~/Documents/projects/mine/nodetest/jade.js:207
if (options.cache && !options.filename) {
^
I am using the latest download of jade, installed via:
$ npm install jade
in the root of my project.
Upvotes: 0
Views: 72
Reputation: 123423
jade.render
expects a callback after the template string, which will be passed the results:
jade.render('!!! 5', function (err, html) {
console.log(html); // <!DOCTYPE html>
});
Upvotes: 2