Cannot start PhantomJS with "grunt serve"

844 views
Skip to first unread message

Aall Spemmer

unread,
Aug 23, 2014, 2:09:45 PM8/23/14
to ozonepla...@googlegroups.com
I was trying to run the latest version of OZP.  When I execute "grunt serve" I keep getting a "Cannot start PhantomJS" error.  This is the bottom part of the output.

Running "karma:continuous" (karma) task
INFO [karma]: Karma v0.12.22 server started at http://localhost:9018/
INFO [launcher]: Starting browser PhantomJS
ERROR [launcher]: Cannot start PhantomJS

WARN [watcher]: Pattern "/home/vagrant/ozp/ozp-webtop/src/**/*.coffee" does not match any file.
INFO [launcher]: Trying to start PhantomJS again (1/2).
ERROR [launcher]: Cannot start PhantomJS

INFO [launcher]: Trying to start PhantomJS again (2/2).
ERROR [launcher]: Cannot start PhantomJS

ERROR [launcher]: PhantomJS failed 2 times (cannot start). Giving up.
Warning: Task "karma:continuous" failed. Use --force to continue.

Aborted due to warnings.

Aall Spemmer

unread,
Aug 24, 2014, 12:07:05 PM8/24/14
to ozonepla...@googlegroups.com
I figured it out.  PhantomJS has a number of OS dependencies.  Since the errors weren't being show when running grunt, I ran PhantomJS by itself.  I got the following error:

/usr/lib/node_modules/phantomjs/lib/phantom/bin/phantomjs: error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory

I installed the dependencies listed on http://phantomjs.org/download.html (command below) and I was able to run OZP:

sudo yum install fontconfig freetype libfreetype.so.6 libfontconfig.so.1 libstdc++.so.6
Reply all
Reply to author
Forward
0 new messages