Webshot does not work on DigitalOcean

December 13, 2017 1.2k views
Ubuntu Node.js

What I did:

var webshot = require('webshot');

webshot('google.com', 'google.png', function(err) {
  // screenshot now saved to google.png 

What didn’t work: The screenshot was not saved. I tried it on Linux Mint and it worked perfectly but when it comes to using DigitalOcean it did not. Any help will be appreciated.

2 Answers

“Does not work” is useless. Give us more information. Did you install the requirements?

I did the same steps on my local, did npm install webshot and ran the script, the screenshot was saved in the same path as the script. However on DigitalOcean, I did exactly the same thing. After I ran the script, I did an ls to show the files but I could not find google.png.

Have another answer? Share your knowledge.