apilayer / html2pdf.it

Webservice for generating pdfs from html
html2pdf.it
548 stars 157 forks source link

Installing Phantom in Mac OS X El Capitan #43

Closed alexventuraio closed 8 years ago

alexventuraio commented 8 years ago

The command provided in the readme file brew install phantomjs does not work with El Capitan, at least for me it shows the next error:

phantomjs: This formula either does not compile or function as expected on OS X versions newer than Yosemite due to an upstream incompatibility. Error: An unsatisfied requirement failed this build.

To install and get it working I used the following command:

sudo npm install phantom phantomjs -g

edm00se commented 8 years ago

The "phantomjs" package in the npm registry is deprecated. The "phantom" package says it's for "hooks" to phantomjs. The readme for this project recommends using homebrew to install phantomjs for Mac, though if you would prefer npm, I would recommend installing phantomjs-prebuilt. Make sure to uninstall those other packages, at a minimum "phantomjs".