1

I am trying to use pageres(https://github.com/sindresorhus/pageres) module to take screenshots of my website in different resolutions.

It works fine when I provide the URL and the size in command line but it doesn't work when I have my urls in a text file. It takes a screenshot of only the last URL in the file. I use the following command to run pageres:

pageres 640x768 < urls.txt

URLs in the text file are newline separated so they look like this:

http://www.yahoo.com
http://www.msn.com
http://www.apple.com

So it basically takes a screenshot of only apple.com and throws the error below for each of the screenshot above it.

The error I get is:

TypeError: 'undefined' is not an object <evaluating 'options.windowSize.width'>

and the file it points to is webshot.phantom.js line 13.

Am I running the command incorrectly or something? I use it the way it is mentioned on their site.

Thank you for your help.

aspnetdeveloper
  • 629
  • 1
  • 7
  • 16

1 Answers1

-1

It might have been a bug at some point, but it works fine in the latest version. Just tested.

Sindre Sorhus
  • 62,972
  • 39
  • 168
  • 232
  • I had to replace the new line character from **crlf** to **lf** in my urls.txt(since I am on Windows) file using Notepad++ to make it work. – aspnetdeveloper Oct 30 '14 at 14:15