When Karma starts from a local installation in my project on my Ubuntu virtual machine, karma does not start because PhantomJS cannot start.
Version Information:
- PhantomJS (also installed locally): 1.9.16
- Karma: 0.12.31
- karma-phantomjs-launcher: 0.1.4
- Ubuntu 14.04.2 LTS
- Node 0.10.25
The same script works fine on my Mac OS (I removed the global karma setting before running it, and it still works).
In Ubuntu, if I start phantomjs directly through. / node_modules / phantomjs / bin / phantomjs, it starts just fine.
Here's the shell output:
> ./node_modules/karma/bin/karma start test/karma.conf.js DEBUG [config]: autoWatch set to false, because of singleRun DEBUG [plugin]: Loading karma-* from /srv/detectiveui/node_modules DEBUG [plugin]: Loading plugin /srv/detectiveui/node_modules/karma-jasmine. DEBUG [plugin]: Loading plugin /srv/detectiveui/node_modules/karma-phantomjs-launcher. DEBUG [plugin]: Loading plugin /srv/detectiveui/node_modules/karma-spec-reporter. INFO [karma]: Karma v0.12.31 server started at http://localhost:9876/ INFO [launcher]: Starting browser PhantomJS DEBUG [temp-dir]: Creating temp dir at /tmp/karma-42625347 DEBUG [launcher]: /srv/detectiveui/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs /tmp/karma-42625347/capture.js DEBUG [launcher]: Process PhantomJS exited with code 2 ERROR [launcher]: Cannot start PhantomJS DEBUG [temp-dir]: Cleaning temp dir /tmp/karma-42625347 INFO [launcher]: Trying to start PhantomJS again (1/2). DEBUG [launcher]: Restarting PhantomJS DEBUG [temp-dir]: Creating temp dir at /tmp/karma-42625347 DEBUG [launcher]: /srv/detectiveui/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs /tmp/karma-42625347/capture.js /tmp/karma-42625347/capture.js DEBUG [watcher]: Resolved files:
I also seem to be able to start the node server manually on port 9876, so probably also not a problem.
Any help would be greatly appreciated. Thanks!
---- UPDATE
I created a new Ubuntu environment and tested the same thing again and got the same error.
source share