kabangi julius
kabangi julius

Reputation: 2709

[Error: PhantomJS exited with return value 127]

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

Answers (3)

Rigos
Rigos

Reputation: 11

I had the same problem in Debian. Installing Phantom with "apt-get install phantomjs" solved the problem.

Upvotes: 1

Pluto
Pluto

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

kabangi julius
kabangi julius

Reputation: 2709

Phantomjs was not installed on the linux server. Installation solved my issue.

Upvotes: 0

Related Questions