Open grimurd opened 9 years ago
Found a solution! If you use docker, avoid using the alphine versions. I switched from node:14-alphine to node:14 And it was all fine
Unfortunately it didn't help me. I found a solution here
I used Docker to replicate the error that was not possible to replicate on localhost, and I could fix it by adding the following command on my Dockerfile:
RUN apk add --no-cache --virtual .build-deps ca-certificates openssl \
&& wget -qO- "https://github.com/dustinblackman/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz" | tar xz -C / \
&& apk del .build-deps
I got it from here.
i am facing same issue but still not able to get the answer
Error: write EPIPE
0|hb Api | at afterWrite
Dispatched (internal/stream_base_commons.js:156:25)
0|hb Api | at writeGeneric (internal/stream_base_commons.js:147:3)
0|hb Api | at Socket._writeGeneric (net.js:787:11)
0|hb Api | at Socket._write (net.js:799:8)
0|hb Api | at writeOrBuffer (internal/streams/writable.js:358:12)
0|hb Api | at Socket.Writable.write (internal/streams/writable.js:303:10)
0|hb Api | at PDF.PdfExec [as exec] (/var/www/html/hbv2Api/node_modules/html-pdf/lib/pdf.js:141:15)
0|hb Api | at PDF.PdfToFile [as toFile] (/var/www/html/hbv2Api/node_modules/html-pdf/lib/pdf.js:83:8)
0|hb Api | at /var/www/html/hbv2Api/app/helper/pdfHelper.js:6:39
0|hb Api | at new Promise (
I'm using nunjucks to render a template into a string, i then try to convert that html to a pdf file however everytime i get this error:
Here is the code i use to create the pdf file:
Here is the HTML string that is generated by nunjucks, not the most readable i know but figured i should post it like it is instead of trying to make it prettier
I've been stuck at this for hours and can't see that im doing anything wrong, any ideas?