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.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
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.

Submit an Answer