Skip to content

Instantly share code, notes, and snippets.

@AdamMagaluk
Created March 8, 2014 15:21
Show Gist options
  • Save AdamMagaluk/9432765 to your computer and use it in GitHub Desktop.
Save AdamMagaluk/9432765 to your computer and use it in GitHub Desktop.
FAILED to get phantomjs version: /mnt/data/1/node_modules/phantomjs/lib/phantom/bin/phantomjs: 3: 4w��h: not found
/mnt/data/1/node_modules/phantomjs/lib/phantom/bin/phantomjs: 3: �����8__TEXT: not found
�n��y�T: not foundodules/phantomjs/lib/phantom/bin/phantomjs: 3: E�bss����j���-��m�b
/mnt/data/1/node_modules/phantomjs/lib/phantom/bin/phantomjs: 6: Syntax error: ")" unexpected
var path = require('path');
var child_process = require('child_process');
var phantomjs = require('phantomjs');
process.env.PATH += ':' + path.dirname(phantomjs.path);
child_process.exec('phantomjs --version',
function(err, stdout, stderr) {
if(err)
console.log('FAILED to get phantomjs version:',stderr);
else
console.log('phantomjs version:',stdout);
}
);
@rndD
Copy link

rndD commented Aug 1, 2014

Hi I have similar error. Do you found how to fix it?

@incredimike
Copy link

If you encounter this issue, you are likely not using the proper phantomjs binary for your architecture.

I incorrectly installed my dependancies on my dev environment with OSX, but the application server is Ubuntu. I "fixed" it for my local dev by installing phantomjs with apt and copying the binary over. Will need to figure out a better approach for production though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment