markdown-pdf
markdown-pdf copied to clipboard
Unhandled stream error in pipe. & Error: spawn phantomjs ENOENT
When I run this on a docker image, it got those errors:
internal/streams/legacy.js:59
throw er; // Unhandled stream error in pipe.
^
Error: spawn /root/...../phantomjs-prebuilt/lib/phantom/bin/phantomjs ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:362:16)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
but works ok on my Mac
I also see this. It can be worked around by creating the missing link:
cd ~/.nvm/versions/node/v10.16.3/bin
ln -s ../lib/node_modules/markdown-pdf/node_modules/phantomjs-prebuilt/bin/phantomjs
Not sure what changed to break this though...
@YuunYang I only get this issue when using alpine (for example, node:alpine). Phantomjs ships with a binary executable probably built with glibc, and not with musl. Do you get the same issue if you use another base image (for example, debian/ubuntu?)