Problems running casperjs with phantomjs # 2.0.0 on Mac (Yosemite)

I am trying to run CasperJS with PhantomJS # 2.0.0 on Mac (Yosemite) . When I try to start CasperJS, I get the following message:

"CasperJS needs PhantomJS v1.x /usr/local/Cellar/casperjs/1.1-beta3/libexec/bin/bootstrap.js:91 in __die" 

How can i run it? Has anyone got his job?

+7
phantomjs casperjs
source share
3 answers

There is currently no newer version than version 1.1-beta3 that contains this check.

The simplest solution would be to open the bin / bootstrap.js file and delete these lines or replace the lines that are currently in the main branch :

 (function (version) { // required version check if (version.major === 1) { if (version.minor < 8) { return __die('CasperJS needs at least PhantomJS v1.8 or later.'); } if (version.minor === 8 && version.patch < 1) { return __die('CasperJS needs at least PhantomJS v1.8.1 or later.'); } } else if (version.major === 2) { console.log("Warning PhantomJS v2.0 not yet released. There will not be any official support for any bugs until stable version is released!"); } else return __die('CasperJS needs PhantomJS v1.x or v2.x'); })(phantom.version); 

Another option: install CasperJS from git .

+8
source share

Modifying / usr / local / Cellar / casperjs / 1.1-beta3 / libexec / bin / bootstrap.js does not work for me. I tried, but some other problems remained (I could not get the casperPath version and version correctly).

This problem has already been fixed in the main branch. Installing from git would solve this problem.

Try

 > git clone git://github.com/n1k0/casperjs.git > cd casperjs > ln -sf `pwd`/bin/casperjs /usr/local/bin/casperjs 

It captures my casperjs perfectly.

+5
source share

I had the same problem. Replacing the phantomJS executable in / usr / local / bin with version 1.9.8 did the trick for me.

+3
source share