0

In AWS ubuntu 16.04, I have this error: {\"code\":\"ENOENT\",\"errno\":\"ENOENT\",\"syscall\":\"spawn /usr/local/bin/phantomjs\",\"path\":\"/usr/local/bin/phantomjs\"}" when using function pdf.create() of html-pdf 2.1.0 I use node v0.12.7

What has already been done:

  1. install "phantomjs-prebuilt": "2.1.14"
  2. Generate symlink sudo ln -s /home/ubuntu/shopper-api/node_modules/html-pdf/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /usr/local/bin/phantomjs

Everything this was no work in aws but in my pc local if work :(

1 Answers1

4

After ssh to your vm, can you try phantomjs --version. If you get any errors, that means the installation is not successful (Which is highly probable in your scenario)

First remove existing symlinks. Then install phantomjs according to following guide. Then it should work.

PhantomJS Ubuntu installation guide