jpm xpi fails if using io.js 1.0.1 instead of node.js #243

Closed
MarcoZehe opened this Issue Jan 14, 2015 · 11 comments

Projects

None yet

6 participants

@MarcoZehe

The error I get on Windows is:

JPM info Starting jpm xpi on Tenon Check

jszip.js:1291
var result = transform[inputType]outputType;
^
TypeError: Cannot read property 'uint8array' of undefined
at Object.JSZip.utils.transformTo (jszip.js:1291:40)
at Object.Uint8ArrayWriter.append (jszip.js:558:33)
at Object.JSZip.generate (jszip.js:774:20)
at C:\Users\Marco\AppData\Roaming\npm\node_modules\jpm\node_modules\zip-dir
index.js:39:24
at C:\Users\Marco\AppData\Roaming\npm\node_modules\jpm\node_modules\zip-dir
index.js:54:13
at C:\Users\Marco\AppData\Roaming\npm\node_modules\jpm\node_modules\zip-dir
index.js:81:11
at fs.js:313:14
at FSReqWrap.oncomplete (fs.js:76:15)

@johannhof
Collaborator

This seems to be an error with JSZip (which probably goes even deeper into the module dependency rabbit hole). I'm looking into it for fun but I don't know if there's much one can do right now.

@MarcoZehe

Would it make sense to file a bug with that module maybe?

@johannhof
Collaborator

That's probably best. Would you mind doing that? :)

@MarcoZehe

Not at all! Done.

@johannhof
Collaborator

👍

Looking further into it zip-dir seems to be using a special (non-npm) version of JSZip, maybe there's something outdated in there that just needs to be fixed.

@dduponchel dduponchel referenced this issue in jsantell/node-zip-dir Jan 14, 2015
Closed

Update JSZip #1

@jsantell
Member

Can't currently test io.js stuff, but i updated zip-dir to 1.0.0 with the change suggested from @dduponchel and all tests pass on node 0.8/0.10, so see if upgrading this package works

@dduponchel

I tested on iojs v1.0.1 with jpm 0.0.21 and an updated zip-dir (1.0.0). The command jpm xpi which failed now create the xpi and Firefox can install it (I only tested the dummy addon).

@jsantell
Member

can't wait for nvm to support iojs so i can test :)

@DavidBruant

There is an official Docker image for io.js, https://registry.hub.docker.com/u/iojs/iojs/
So you don't need nvm to test io.js. To be honest, you don't need nvm at all any longer...
(Docker is amazing. Lots of things to ingest first, but when you've learned the basics, docker is amazing)

@jsantell
Member
jsantell commented Feb 3, 2015

nvm supports iojs now (in lieu of me learning docker right now) :D

@erikvold
Contributor

this should work now

@erikvold erikvold closed this Feb 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment