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

Node deprecation Warning #21

Open
danverde opened this issue Oct 2, 2017 · 1 comment
Open

Node deprecation Warning #21

danverde opened this issue Oct 2, 2017 · 1 comment

Comments

@danverde
Copy link

danverde commented Oct 2, 2017

When using :

zip.zipFolder('fileToZip', function () {
  zip.writeToFile('newPath.zip');
  console.log('done?');
});

Node gives the following warning:

[DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
@prust
Copy link

prust commented Oct 28, 2018

In Node 10.x, it is no longer deprecated, it now throws an error when you call zip.writeTofile() without passing a callback (as the examples do):

Callback must be a function: TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at maybeCallback (fs.js:157:9)
at Object.fs.writeFile (fs.js:1276:14)
at EasyZip.writeToFile (C:\Users\peter.rust\repos\qpm\node_modules\easy-zip\easyzip.js:120:6)

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