Skip to content

Bug with the errors in index.js #36

@intradeus

Description

@intradeus

After creating an electron app and packaging it, everything was going quite well (thanks btw, its a nice tool). After creating about 200 receipts in testings and 100 receipts in production, I got an error :

Uncaught TypeError: err.push is not a function at WriteStream.<anonymous> (VM310 index.js:256) at WriteStream.emit (events.js:215) at errorOrDestroy (internal/streams/destroy.js:108) at onwriteError (_stream_writable.js:446) at onwrite (_stream_writable.js:473) at doWrite (_stream_writable.js:427) at writeOrBuffer (_stream_writable.js:415) at WriteStream.Writable.write (_stream_writable.js:305) at ReadStream.ondata (_stream_readable.js:726) at ReadStream.emit (events.js:210)

and in your index.js , your code goes like this :

var **err** = []; ops.output.on("error", function (**err**) { return **err**.push(**err**); });

From what I understand with the "TypeError: err.push is not a function", calling your error Array the same way you called your error parameter creates this bug. I tried switching the Array to "errors" and it seemed to work, but I cannot be certain since it maybe didn't throw any error when I tried.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions