Reputation: 2709
I have the following code that generates a webshot of my site. It works on my local machine(Windows environment) but on test server which is linux I get PhantomJS exited with return value 127. What does this error mean and how can I resolve it?
webshot(url, fileName, options, function(err) {
if(!err){
fs.readFile(fileName, function (err,data) {
if (err) {
console.log(fileName);
return console.log(err);
}
fs.unlinkSync(fileName);
fut.return(data);
});
}else{
console.log(url);
console.log(err);
fut.return("Error Occurred");
}
});
Upvotes: 1
Views: 2181
Reputation: 11
I had the same problem in Debian. Installing Phantom with "apt-get install phantomjs" solved the problem.
Upvotes: 1
Reputation: 3026
The problem for me was that I needed to install an additional library, which was fontconfig.
Source information: http://phantomjs.org/download.html
Upvotes: 0
Reputation: 2709
Phantomjs was not installed on the linux server. Installation solved my issue.
Upvotes: 0