Skip to content
This repository

grunt qunit failes due to PhantomJS Error #5

Closed
aidaeology opened this Issue · 5 comments

5 participants

Aida Tavakkolie Ben Alman Matt Dawson Dennis Evert imnilesh2
Aida Tavakkolie

I installed grunt-contrib-qunit with the following command:
npm install grunt-contrib-qunit --save-dev

> phantomjs@0.2.3 install /Users/atavakkolie/Workspace/orion/tetrapak2/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs
> node install.js

Requesting /Users/atavakkolie/Workspace/orion/tetrapak2/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/tmp/phantomjs-1.7.0-macosx.zip
Receiving...
Recieved 781K...
Recieved 1565K...
Recieved 2348K...
Recieved 3131K...
Recieved 3913K...
Recieved 4696K...
Recieved 5478K...
Recieved 6260K...
Recieved 7043K...
Recieved 7825K...
Recieved 8607K...
Recieved 9390K...
Recieved 10172K...
Recieved 10182K total.
Extracting zip contents
grunt-contrib-qunit@0.1.0 node_modules/grunt-contrib-qunit
└── grunt-lib-phantomjs@0.1.0 (semver@1.0.14, eventemitter2@0.4.11, temporary@0.0.5, phantomjs@0.2.3)

and when I try to run grunt qunit I get the following error:

Running "qunit:files" (qunit) task
Testing index.html
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'm using grunt@0.4 within a nodeenv on Mac OSX v10.6.8

Ben Alman
Owner

I'm not sure. Maybe try installing grunt-contrib-qunit again?

Matt Dawson

I'm fairly certain this is related to this phantomjs issue: Medium/phantomjs#15

I'm also fairly certain it's a race condition of some sort. I'm having a hell of a time debugging it though, as the behavior is very inconsistent.

Aida Tavakkolie

I tried reinstalling multiple times without success.

It looks like it is a similar issue to Obvious/phantomjs#15. I had to manually move the binary to the correct location (also the binary that was unpacked was half the size and did not execute):

cp node_modules/phantomjs/tmp/phantomjs-1.7.0-macosx/bin/phantomjs node_modules/phantomjs/bin/phantomjs

That got it working.

Dennis Evert

This issue is still present on Windows 7. I've tried both installing phantomjs globally with npm and without, but no matter what I do I get this error:

Running "qunit:all" (qunit) task
Testing test/index.html
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.

Node version is v0.10.15

imnilesh2

@devert Are you able to solve this error on Windows 7 box?
I am still facing the same problem. Even using following package.json not solving the issue.
{
....
"grunt": "~0.4.2",
"phantomjs": "1.8.1-1",
"grunt-contrib-jasmine": "~0.5.2"

}

I am doing "npm install" for automatic installations, no manual steps.
I could also see phantomjs 1.8.1-1 getting properly installed and the "npm install" process did not stuck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.