当我运行这个我得到一个错误
GET /pdfreport - - ms - -
WARRNING! '$data.ObjectID' not supported as computed Key!
WARRNING! '$data.ObjectID' not supported as computed Key!
WARRNING! '$data.ObjectID' not supported as computed Key!
WARRNING! '$data.ObjectID' not supported as computed Key!
WARRNING! '$data.ObjectID' not supported as computed Key!
Recipe phantom-pdf was not found.
GET /pdfreport - - ms - -
{ [Error: ENOENT, unlink '/var/folders/r0/l6_3z9g55x95s7dp34yt3scw0000gn/T/xcrun_db']
errno: 34,
code: 'ENOENT',
path: '/var/folders/r0/l6_3z9g55x95s7dp34yt3scw0000gn/T/xcrun_db' }
我有这样的节点快速路由设置:
app.route('/pdfreport')
.get(function (req, res) {
var jsreport = require('jsreport');
jsreport.bootstrapper(jsreport.renderDefaults).start().then(function(conf) {
conf.reporter.render({
template: {
content: "<h1>Hello world</h1>",
phantom: {
header: "<p>some header</p>",
orientation: "portrait",
width: "300px"
}
}
}).then(function(out) {
out.result.pipe(res);
}).fail(function(e) {
console.log(e);
});
});
});
我不确定如何解决此错误。我在网上查找了食谱幻影-pdf 没有找到。