Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Can't run PhantomJS with mocha on node js

Can't run PhantomJS with mocha on node js


I'm trying to run Phantomjs with these params:

mocha-phantomjs -s disk-cache=no --ignore-leaks -R xunit tests/index.html

but allways got this respond:

        throw er; // Unhandled 'error' event
Error: spawn ENOENT
    at errnoException (child_process.js:980:11)
    at Process.ChildProcess._handle.onexit (child_process.js:771:34)

I use ubuntu 13, mocha-phantomjs 3.1.0 and Node v0.10.15.

Any googling doesn't helps and I just can't figure out what to do. All what i did before, is just install node and mocha-phantomjs

Can anyone help me?

Problem courtesy of: uhthska


I have seen this error on a windows machine, and solved it by copying Phantomjs Executable to the node.js folder.

Make sure that either phantomjs executable is in PATH or phantomjs executable is in node.js folder.

Solution courtesy of: mm6502


View additional discussion.

This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Can't run PhantomJS with mocha on node js


Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription