msi-packager icon indicating copy to clipboard operation
msi-packager copied to clipboard

`fs.write` requiring `callback`

Open JonathanILevi opened this issue 3 years ago • 1 comments

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 avatar May 18 '21 16:05 JonathanILevi

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

https://github.com/mmckegg/msi-packager/blob/b8b4af59031d2f53795b787da00719729d7cd420/index.js#L33

I installed with npm, does it need updated?

JonathanILevi avatar May 18 '21 16:05 JonathanILevi