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

deprecation issue in data event example in readme #25

Open
Frijol opened this issue Nov 14, 2018 · 0 comments
Open

deprecation issue in data event example in readme #25

Frijol opened this issue Nov 14, 2018 · 0 comments

Comments

@Frijol
Copy link
Member

Frijol commented Nov 14, 2018

running the still image on 'data' event from the readme:

'use strict';
const fs = require('fs');
const path = require('path');

const av = require('tessel-av');
const camera = new av.Camera();
const capture = camera.capture();

capture.on('data', function(data) {
  fs.writeFile(path.join(__dirname, 'captures/captured-via-data-event.jpg'), data);
});

creates this error

(node:1897) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
fs.js:113
      throw err;  // Forgot a callback but don't know where? Use NODE_DEBUG=fs
      ^
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

1 participant