Casperjs – Couldn’t find nor compute phantom.casperPath, exiting


I just installed phantomjs v2.0 on a Windows box, add its location to its path, download casperjs v1.0.4, extract to root folder on C: drive, rename the folder to casperjs, add casperjs\batchbin to its path (not casperjs\bin as suggested in its documentation), invoking casperjs –version on the command line, but then getting this error message

Couldn’t find nor compute phantom.casperPath, exiting

googling for a minutes, I got the solution here https://github.com/n1k0/casperjs/issues/1150

just add these 4 lines code into casperjs\bin\bootstrap.js file


var system = require('system');
var argsdeprecated = system.args;
argsdeprecated.shift();
phantom.args = argsdeprecated;

One thought on “Casperjs – Couldn’t find nor compute phantom.casperPath, exiting

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s