iamchrismiller / grunt-casper

Run CasperJS Scripts/Functional Tests
Other
69 stars 38 forks source link

Fails with non-global version of casperjs/phantomjs #29

Closed schickling closed 10 years ago

schickling commented 10 years ago

It would be nice if the plugin would also work with a non-global installation of phantomjs and casperjs. When I use the casperjs/phantomjs version I installed with --save-dev I get this error:

Error: Task "casper:test" failed.
    at Task.<anonymous> (/xxx/node_modules/grunt/lib/util/task.js:197:15)
    at null._onTimeout (/xxx/node_modules/grunt/lib/util/task.js:225:33)
    at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

Aborted due to warnings.
iamchrismiller commented 10 years ago

This doesn't attribute the errors to casper/phantom? Is there more logging that could help identify the issue? What are you installing with --save-dev exactly?

The CasperJS/PhantomJS binaries need to be installed on your host machine which is usually in a "global" sense.

schickling commented 10 years ago

I installed phantomjs and casperjs with --save-dev so the binaries are also available in the local node_modules folder. Am I missing something?

iamchrismiller commented 10 years ago

Well, PhantomJS and CasperJS are not Node Modules therefore they cannot be used directly.

Although PhantomJS does export the binary path which can be set in the environment and CasperJS includes the binary in its local .bin directory.

Version 0.3.0 includes these changes and uses these local binaries.

schickling commented 10 years ago

Thanks @iamchrismiller