e2e tests with Protractor using Phantom.js
<p>I'm reading this <a href="https://docs.angularjs.org/tutorial" rel="nofollow">Angular tutorial</a> and in the first chapter they explained how to run unit and e2e tests. In the tutorial they use Chrome and Firefox. Since I run application on Ubuntu 14 virtual machine with no GUI I decided to use Phantomjs browser.</p>

<p>Eventually I was able to run unit tests with Phantom, but I have problems with e2e.</p>

<p>This is how protractor-conf.js looks like:</p>

<pre><code>exports.config = {
allScriptsTimeout: 11000,

specs: [
'e2e/*.js'
],

  capabilities: {
    'browserName': 'phantomjs',
    'phantomjs.binary.path':'./node_modules/phantomjs/bin/phantomjs',
    'phantomjs.ghostdriver.cli.args': ['--loglevel=DEBUG']
  },

  chromeOnly:true,

  baseUrl: 'http://localhost:8000/',

  framework: 'jasmine',

  jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
</code></pre>

<p>But when I run tests there is a following error:</p>

<pre><code>Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
[launcher] Process exited with error code 1

events.js:72
    throw er; // Unhandled 'error' event
          ^
Error: spawn ENOENT
at errnoException (child_process.js:988:11)
at Process.ChildProcess._handle.onexit (child_process.js:779:34)
npm ERR! weird error 8
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0
</code></pre>

<p>Did I miss something in configuration? How to get more detailed error description in this case?</p>