Search code examples
ubuntu-12.04gruntjsqunit

How do you install grunt-contrib-qunit in Ubuntu server 12.04 64?


I have a grunt project with the following npm dependancies:

  • grunt-contrib-qunit
  • grunt-contrib-compass
  • grunt-contrib-jshint

I created an Ubuntu 12.04 64 bit server in VirtualBox VM (from an Ubuntu host) and ran the following commands:

sudo apt-get update
sudo apt-get install -y ruby rubygems gcc python make
sudo gem install compass

wget http://nodejs.org/dist/v0.10.15/node-v0.10.15.tar.gz
tar -xzf node-v0.10.15.tar.gz
cd node-v0.10.15/
./configure 
make
sudo make install
cd ../
rm -Rf node-v0.10.1
rm node-v0.10.15.tar.gz 

sudo npm install -g grunt-cli

Supposedly that installed npm. Then I used git clone to clone a grunt project that I was using in CentOS (it all works in CentOS). Unfortunately when I ran grunt it failed when trying to run qunit with the following error:

Running "qunit:dist" (qunit) task Testing /home/testuser/myproject/test/index.html OK

Running PhantomJS...ERROR

In order for this task to work properly, PhantomJS must be installed locally via NPM. If you're seeing this message, generally that means the NPM install has failed. Please submit an issue providing as much detail as possible at: https://github.com/gruntjs/grunt-lib-phantomjs/issues Warning: PhantomJS not found. Use --force to continue.

Aborted due to warnings.

I even ran npm update from the grunt folder and it still has this error.

What am I missing?

edit Please note the following facts:

  1. This project works in CentOS without error.
  2. This project has all of the plugin's installed locally using --save-dev
  3. Overwriting the local installs by installing each dependency manually does not fix this issue.
  4. Uninstalling and reinstalling each dependency manually does not fix this.

Solution

  • I just solved it.

    sudo apt-get install phantomjs
    

    After running that it works.

    I found that after reading this: https://github.com/gruntjs/grunt-lib-phantomjs/issues/22