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

Incompatibility with node 12 #51

Open
mrbuds opened this issue Apr 11, 2020 · 0 comments
Open

Incompatibility with node 12 #51

mrbuds opened this issue Apr 11, 2020 · 0 comments

Comments

@mrbuds
Copy link

mrbuds commented Apr 11, 2020

$ moonshine distil api.lua
fs.js:151
    throw new ERR_INVALID_CALLBACK(cb);
    ^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function. Received undefined
    at makeCallback (fs.js:151:11)
    at Object.unlink (fs.js:1041:14)
    at C:\Users\buds\AppData\Roaming\npm\node_modules\moonshine\bin\commands\distil.js:170:6
    at ChildProcess.exithandler (child_process.js:294:7)
    at ChildProcess.emit (events.js:311:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) {
  code: 'ERR_INVALID_CALLBACK'
}

This is fixed by replacing in bin\commands\distil.js line 170

fs.unlink(luacFilename);

with

fs.unlinkSync(luacFilename);
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