写EPIPE致命错误

时间:2017-02-03 03:26:01

标签: javascript node.js

我是nodejs的新手,我遵循了源码指南: - https://github.com/devongovett/node-wkhtmltopdf

每当我跑咕噜声时,我都会Fatal error: write EPIPE。知道为什么吗?

var file_output = 'output.pdf';

    console.log("Warming up");

              var wkhtmltopdf = require('wkhtmltopdf');

              console.log("wkhtmltopdf started");

              wkhtmltopdf('<h1>Hello!</h1>',{ pageSize: 'letter' }, function (err, stream) {    


                if (err) {
                  console.log('wkhtmltopdf error : ', err);
                } else {
                  console.log("Converting!!");

                  var createstream = stream.pipe(fs.createWriteStream(file_output));

                  console.log('Done!');

    });

0 个答案:

没有答案