Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't capture on Ubuntu 14.10 and MacOS X Mavericks #1

Open
snadal opened this issue Mar 13, 2015 · 2 comments
Open

Doesn't capture on Ubuntu 14.10 and MacOS X Mavericks #1

snadal opened this issue Mar 13, 2015 · 2 comments

Comments

@snadal
Copy link

snadal commented Mar 13, 2015

I've tested nw-js, but it doesn't seems to work (or more probably, I am not doing it right :) )

1.- Create file shot.js with contents

var fs = require('fs');
var screenshot = require('nw-shot');

screenshot({
  url : 'http://google.com',
  width : 1024,
  height : 768
}).pipe(fs.createWriteStream('./out.png'));

2.- # npm install nw
3.- # npm install mw-shot
4.- # node shot.js

A window is opened for a fraction of second, and creates an empty file out.png.
It does not return cursor until I hit ^C

Am I missing something ?

@davidmarkclements
Copy link
Owner

Hey @snadal I'll look into this when I'm back in front of a laptop (e.g. nxt week).

one thing, theres an error in the readme, it should be npm install nw-shot not npm install nw, there's no need to install nw as thats a dependency in package.json.

Make sure you're starting in a freesh module, e.g. run npm init in a new folder, run npm install nw-shot then try running the example, this way you can ensure its using the nw version listed in package.json

@snadal
Copy link
Author

snadal commented Mar 15, 2015

Hello David and thank you for your response :)

That's what I did. I saw the typo on the read me, and installed mw-shot instead, but I've done it again, just in case I missed something.

Again, nw application shows for a fraction of second on the launch bar and then disappears. node sample.js doesn't return to shell until I hit ^C

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants