evshiron / nwjs-builder

https://www.npmjs.com/package/nwjs-builder
76 stars 12 forks source link

TypeError: Incorrect value of args option #63

Open jhm-ciberman opened 7 years ago

jhm-ciberman commented 7 years ago
const NWB = require('nwjs-builder');
NWB.commands.nwbuild(".", {run:true}, () => {
  console.log("Bye!!")
});

Throws the following:

{ platform: 'win32',
  arch: 'x64',
  version: 'v0.20.2',
  flavor: null }
workingDir: C:\Users\XXXXXX~1\AppData\Local\Temp\d-117116-11492-1emfia4
C:\repos\nwjs-toolkit\node_modules\regenerator-runtime\runtime.js:537
        throw exception;
        ^

TypeError: Incorrect value of args option
    at normalizeSpawnArguments (child_process.js:323:11)
    at exports.spawn (child_process.js:356:38)
    at Object.LaunchExecutable (C:\repos\nwjs-toolkit\node_modules\nwjs-builder\lib\index.js:251:14)
    at Object._callee2$ (C:\repos\nwjs-toolkit\node_modules\nwjs-builder\lib\commands.js:552:36)
    at tryCatch (C:\repos\nwjs-toolkit\node_modules\regenerator-runtime\runtime.js:64:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (C:\repos\nwjs-toolkit\node_modules\regenerator-runtime\runtime.js:3
55:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\repos\nwjs-toolkit\node_modules\regenerator
-runtime\runtime.js:116:21)
    at Immediate._onImmediate (C:\repos\nwjs-toolkit\node_modules\node-async-flow\lib\index.js:15:22)
    at processImmediate [as _immediateCallback] (timers.js:383:17)
evshiron commented 7 years ago

I'm sorry that I assumed the argument to be an array with run: true. This should be fixed.

At this moment, try NWB.commands.nwbuild(['.']) instead.