ember-cli: 0.2.0: npm test throws unhandled error

I’m seeing this for fresh apps and addons, likely an updated dependency since this wasn’t happening last week.

$ npm test

> testaddon@0.0.0 test c:\Projects\GitHub\testaddon
> ember test

version: 0.2.0-beta.1
Built project successfully. Stored in "c:\Projects\GitHub\testaddon\tmp\class-te
sts_dist-guQcj4VZ.tmp".

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at errnoException (child_process.js:1001:11)
    at Process.ChildProcess._handle.onexit (child_process.js:792:34)
npm ERR! Test failed.  See above for more details.

Steps to reproduce:

  1. ember new testapp or ember addon testaddon
  2. cd into the new folder
  3. npm test

My environment:

Windows 7 Home ember-cli: 0.2.0-beta.1 node: 0.12.0 (also tried on 0.10.33) npm: 2.1.8

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 39 (35 by maintainers)

Most upvoted comments

@elwayman02 If it is indeed failing to find phantomjs can you try installing phantomjs with (chocolatey) https://chocolatey.org/

Basically npm installs phantom in such a way that it tries to execute it via a bat file. This works fine from the shell, but bat files don’t work from spawn (https://github.com/joyent/node/issues/23180)

If I use npm phantomjs I get an error, but everything works if I use the choclatey version of phantom. I had to do this a while back on ember-cli’s windows CI.

Hope this helps.

-ray