Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ChrisHubinger opened this issue May 8, 2013 · 15 comments
Closed

Comments

@ChrisHubinger
Copy link

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
Copy link
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.

@ChrisHubinger
Copy link
Author

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
Copy link
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.

@ChrisHubinger
Copy link
Author

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

@metaskills
Copy link
Collaborator

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

@metaskills metaskills reopened this May 10, 2013
@ChrisHubinger
Copy link
Author

Will keep you informed about my imvestigatin

@vvo
Copy link

vvo commented May 28, 2013

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

@AlanKavanagh
Copy link

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

@geekyme
Copy link

geekyme commented Jun 12, 2013

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
Copy link

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
Copy link

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

@haydnhkim
Copy link

@geekyme Wow! thanks!

@noscripter
Copy link

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
Copy link

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

@etoah
Copy link

etoah commented Aug 3, 2016

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests