webaverse / xrpackage-cli

XRPackage command line interface
4 stars 5 forks source link

"xrpk build" failing to build package #7

Closed JoeLudwig closed 4 years ago

JoeLudwig commented 4 years ago

Presumably the contents of "dist" aren't what was expected, but there's not much to go on from the spew.

Here is that directory zipped up: dist.zip

E:\homedev\foo>xrpk build dist foo_gadget
cli.js build [input] [output]

build xrpackage .wbn from [input] and write to [output]

Positionals:
  input   input file to build
  output  output file to write

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]

TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type undefined
    at Function.from (buffer.js:293:9)
    at byteString (C:\Users\Joe\AppData\Roaming\npm\node_modules\xrpk\node_modules\wbn\lib\encoder.js:202:19)
    at Map.encodeCBOR (C:\Users\Joe\AppData\Roaming\npm\node_modules\xrpk\node_modules\wbn\lib\encoder.js:158:36)
    at Encoder._pushObject (C:\Users\Joe\AppData\Roaming\npm\node_modules\xrpk\node_modules\cbor\lib\encoder.js:582:16)
    at Encoder.pushAny (C:\Users\Joe\AppData\Roaming\npm\node_modules\xrpk\node_modules\cbor\lib\encoder.js:647:21)
    at Encoder._encodeAll (C:\Users\Joe\AppData\Roaming\npm\node_modules\xrpk\node_modules\cbor\lib\encoder.js:675:12)
    at Object.encodeOne (C:\Users\Joe\AppData\Roaming\npm\node_modules\xrpk\node_modules\cbor\lib\encoder.js:712:33)
    at encodeCanonical (C:\Users\Joe\AppData\Roaming\npm\node_modules\xrpk\node_modules\wbn\lib\encoder.js:183:22)
    at BundleBuilder.addResponse (C:\Users\Joe\AppData\Roaming\npm\node_modules\xrpk\node_modules\wbn\lib\encoder.js:104:42)
    at BundleBuilder.addExchange (C:\Users\Joe\AppData\Roaming\npm\node_modules\xrpk\node_modules\wbn\lib\encoder.js:39:38)
    at Object.handler (C:\Users\Joe\AppData\Roaming\npm\node_modules\xrpk\cli.js:620:15)
    at Object.runCommand (C:\Users\Joe\AppData\Roaming\npm\node_modules\xrpk\node_modules\yargs\lib\command.js:240:40)
    at Object.parseArgs [as _parseArgs] (C:\Users\Joe\AppData\Roaming\npm\node_modules\xrpk\node_modules\yargs\yargs.js:1154:41)
    at Object.get [as argv] (C:\Users\Joe\AppData\Roaming\npm\node_modules\xrpk\node_modules\yargs\yargs.js:1088:21)
    at Object.<anonymous> (C:\Users\Joe\AppData\Roaming\npm\node_modules\xrpk\cli.js:696:5)
    at Module._compile (internal/modules/cjs/loader.js:956:30) {
  code: 'ERR_INVALID_ARG_TYPE'
}
Zetaphor commented 4 years ago

Blocked by webaverse/xrpackage#7

avaer commented 4 years ago

Is it? I think directory build is supported, it's just bugged. That's not necessarily related to zips.

JoeLudwig commented 4 years ago

I don't have any zips in my dist directory. I just included it so you would have exactly my repro case.

Zetaphor commented 4 years ago

Yeah that was my mistake, I misread the comment and interpreted it as you attempting to use a zip

avaer commented 4 years ago

One of the throws was due to not understanding the Aardvark gadget xr_type.

avaer commented 4 years ago

This should be working as of 0.0.24.

avaer commented 4 years ago

Note that it will still fail to screenshot on the frontend due to not supporting Aardvark yet -- but the packaging process should succeed.