domenic / svg2png

Converts SVGs to PNGs, using PhantomJS
Other
584 stars 134 forks source link

nothing happens when running on MS Azure #101

Open k-yle opened 6 years ago

k-yle commented 6 years ago

Hi, this works perfectly on my local machine but not on an azure web-app.

This is the code (using express):

app.get('/some/end/point/:id/image.png', (req, res) => {
        const { id } = req.params;
        something
            .doSomething(id)
            .then((result) => jade.compileFile('./somefile.jade')(result))
            .then(svg2png)
            .then((buffer) => {
                res.contentType('.png');
                res.send(buffer);
            })
            .catch((err) => {
                console.log(err);
                res.send('Error');
            });
    });

It gets up to the

 .then(svg2png)

part, but then the next .then() is never triggered, nor is .catch().

These are the install logs:

...
> phantomjs-prebuilt@2.1.15 install D:\home\site\wwwroot\node_modules\phantomjs-prebuilt
> node install.js

Found PhantomJS at D:\home\site\wwwroot\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe ...verifying
PhantomJS is previously installed at D:\home\site\wwwroot\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe

Npm v5.5.1, node v6.11.4.