Open menarayanzshrestha opened 3 years ago
just started to getting the same error, @menarayanzshrestha any progress?
@radzk @menarayanzshrestha I had the same problem but I found some solution: If I understand correctly the problem is this package need fonts and try to reach phantomJs but not exist in the environment https://github.com/marcbachmann/node-html-pdf/issues/612#issuecomment-798835694 https://github.com/marcbachmann/node-html-pdf/issues/612#issuecomment-854249720 https://github.com/marcbachmann/node-html-pdf/issues/35#issuecomment-155144094
everything works fine on local server ..... but when i deploy it in AWS server using docker .I respond be this error.
Error: write EPIPE
at afterWriteDispatched (internal/stream_base_commons.js:150:25)
at writeGeneric (internal/stream_base_commons.js:141:3)
at Socket._writeGeneric (net.js:771:11)
at Socket._write (net.js:783:8)
at doWrite (_stream_writable.js:431:12)
at writeOrBuffer (_stream_writable.js:415:5)
at Socket.Writable.write (_stream_writable.js:305:11)
at PDF.PdfExec [as exec] (/usr/src/app/node_modules/html-pdf/lib/pdf.js:141:15)
at PDF.PdfToFile [as toFile] (/usr/src/app/node_modules/html-pdf/lib/pdf.js:83:8)
at /usr/src/app/dist/modules/merchant/merchantprofile.service.js:1021:22 {
errno: 'EPIPE',
code: 'EPIPE',
syscall: 'write'
}
Error: spawn /usr/src/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn /usr/src/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs',
path: '/usr/src/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs',
spawnargs: [
'/usr/src/app/node_modules/html-pdf/lib/scripts/pdf_a4_portrait.js'
]
}
(node:18) UnhandledPromiseRejectionWarning: Error: spawn /usr/src/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
(node:18) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:18) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.