Created
March 8, 2014 15:21
-
-
Save AdamMagaluk/9432765 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} | |
); |
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
Hi I have similar error. Do you found how to fix it?