SpookyJS example/hello.js fails with "throw er; // Unhandled 'error' event"

1.4k views Asked by At

When I run the hello example from SpookyJS, it fails with the following error:

$ node examples/hello.js
events.js:72
    throw er; // Unhandled 'error' event
          ^
Error: spawn ENOENT
  at errnoException (child_process.js:998:11)
  at Process.ChildProcess._handle.onexit (child_process.js:789:34)

In fact, all examples that I tried result in this error. I'm stuck, as I cannot interpret the error message even when looking into the source code. Do you have any ideas?

(I'm using Ubuntu with phantomjs 1.9.7)

1

There are 1 answers

0
Philipp Claßen On BEST ANSWER

Solution: npm install -g casperjs

I assumed that it is enough to call npm install locally, but casperjs must be in the path. After I installed casperjs globally, the example worked fine.