我正在使用下面的代码使用html-pdf库生成PDF,该代码正在运行并在本地系统上生成并保存pdf,但是当我使用服务器时,它给出了错误。节点库为:-html-pdf
pdf.create(html).toFile(config.media_image+`invoices/invoice-${params._id}.pdf`,
function(err, res){console.log(res.filename);}});
但是它不能在服务器上工作并且在本地系统上也可以正常工作。下面的错误是:-
events.js:167
throw er; // Unhandled 'error' event
Error: write EPIPE
at WriteWrap.afterWrite [as oncomplete] (net.js:792:14)
Emitted 'error' event at:
at onwriteError (_stream_writable.js:431:12)
at onwrite (_stream_writable.js:456:5)
at _destroy (internal/streams/destroy.js:40:7)
at Socket._destroy (net.js:617:3)
at Socket.destroy (internal/streams/destroy.js:32:8)
at WriteWrap.afterWrite [as oncomplete] (net.js:794:10)
请让我知道这个问题。...