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

fs.write requiring callback #21

Open
JonathanILevi opened this issue May 18, 2021 · 1 comment
Open

fs.write requiring callback #21

JonathanILevi opened this issue May 18, 2021 · 1 comment

Comments

@JonathanILevi
Copy link

When trying to use this fs.write on line 33 of index.js was crashing because the callback "was not a function".

fs.js:128
  throw new ERR_INVALID_CALLBACK();
  ^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
    at maybeCallback (fs.js:128:9)
    at Object.write (fs.js:540:14)
    at .../node_modules/msi-packager/index.js:33:10

I added a dummy function (()=>{}) and it works.

      fs.write(info.fd, xml, ()=>{})
@JonathanILevi
Copy link
Author

Hum, I must have an old version, it appears to already be fixed properly.

fs.write(info.fd, xml, function(err) {

I installed with npm, does it need updated?

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