You can clone with
HTTPS or Subversion.
Our mocha tests ran fine on OSX using mocha-phantomjs (latest version) using node v0.10.5 but on Windows7 (x64) i get the following error:
throw er; // Unhandled 'error' event
Error: spawn ENOENT
at errnoException (child_process.js:975:11)
at Process.ChildProcess._handle.onexit (child_process.js:766:34)
I've setup test files to reproduce the error at https://gist.github.com/theanimal666/5538827
Here the details of my environment:
I also tried different shells (git bash, cmd, powershell), the error is always the same. In Chrome the tests run fine.
Do a little github issue searching. In #53 that has "spawn ENOENT" in it talks about how this could be happening from not having PhantomJS installed which led to a clarification in the README. Also, #58 is on the topic of how the latest version of Mocha breaks on mocha-phantomjs. So this issue duplicates both. HTH.
Thanks for your fast reaction. I looked at the issues first and saw both of them - for #53 - i have PhantomJS installed (npm install -g phantomjs) so i do not see how that helps in my case. And the error shown in #58 is completely different - at least i can't see the relationship to the one i got.
I would not focus issue #58's error message but what it is about. You should downgrade mocha to the latest 1.8 version and try.
Thanks, unfortunately that did not fix the issue for me, still getting the same error with mocha 1.8.2.
OK, rep-opend the issue then. Please do keep investigating and report back.
Will keep you informed about my imvestigatin
I had exactly the same problem, solved by not installing phantomjs with npm install -g but by downloading it from phantomjs.org then putting it in c:\phantomjs and adding c:\phantomjs to my PATH
On windows XP.
hope it helps
Still having this issue on win 8 even after doing vvo's solution
i'm also using win 8 and my phantomjs.exe is located in C:/Users/shawnlim/AppData/Roaming/npm/node_modules/phantomjs/lib/phantom/phantomjs.exe
Copy that phantomjs.exe, go all the way back to [the path to]/Roaming/npm/ and paste it in that folder. Then it works for me.
Issue is still open, although IMO it's totally unrelated to phantomJs. You can have no need for phantomJs, and on Windows 8 create a simple express server script and see this error.
@geekyme Thanks! That solved my issue on Windows 7 64-Bit.
@geekyme Wow! thanks!
Having the same problem too, but my package.json files have nothing to do with phantom.js, maybe it's related to npm or platform-specific.