Getting the Error: spawn ENOENT on Windows7 x64. with node v0.10.5 #61

Closed
theanimal666 opened this Issue May 8, 2013 · 15 comments

Projects

None yet
@theanimal666

Hi,

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:

events.js:72
        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:

  • Windows7 x64 (fully patched)
  • Node.Js 0.10.5
  • PhantomJS 1.9.0
  • mocha 1.9.0

I also tried different shells (git bash, cmd, powershell), the error is always the same. In Chrome the tests run fine.

regards,
Chris

@metaskills
Collaborator

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.

@metaskills metaskills closed this May 8, 2013
@theanimal666

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.
regards,
chris

@metaskills
Collaborator

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.

@theanimal666

Thanks, unfortunately that did not fix the issue for me, still getting the same error with mocha 1.8.2.

@metaskills
Collaborator

OK, rep-opend the issue then. Please do keep investigating and report back.

@metaskills metaskills reopened this May 10, 2013
@theanimal666

Will keep you informed about my imvestigatin

@vvo

Hello,

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

@metaskills metaskills closed this Jun 7, 2013
@AlanKavanagh

Still having this issue on win 8 even after doing vvo's solution

@geekyme

Hi,

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.

@zachrybaker

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.

@BrandonJF

@geekyme Thanks! That solved my issue on Windows 7 64-Bit.

@haydnhkim

@geekyme Wow! thanks!

@noscripter

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.

@svsteenoven

thnx solved the issue on win8.1. sidenode: don't forget to restart cmd

@OlsonDev OlsonDev referenced this issue in OlsonDev/typed-keyboardjs Apr 16, 2016
Merged

Correct type definitions according to source repo #2

@etoah

@geekyme Thanks! That solved my issue on Windows 7 64-Bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment