markdown-pdf icon indicating copy to clipboard operation
markdown-pdf copied to clipboard

Unhandled stream error in pipe. & Error: spawn phantomjs ENOENT

Open YuunYang opened this issue 5 years ago • 2 comments

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

YuunYang avatar Aug 08 '19 02:08 YuunYang

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...

oliversturm avatar Sep 17 '19 09:09 oliversturm

@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?)

jpleau avatar Sep 25 '19 17:09 jpleau