Skip to content

Huge wall of text printed on uncaught exceptions in Node.js #94

Closed

Description

@lastmjs

There is a problem that binaryen.js seems to be embodied with in Node.js where the entire minified contents of binaryen.js is printed to the terminal on uncaught exceptions. The issue has been reported in multiple places, and the root of the issue seems to be in Node.js. The Node.js issue hasn't seen any activity.

I'm hoping raising the issue here might lead to some insight, workarounds, or finally getting it fixed in Node.js.

Here are the existing issues:

Activity

  1. CountBleck commented on Jul 16, 2024

    @CountBleck
    Member

    We're aware of this issue (which is ultimately Node's fault). --enable-source-maps used to work, but it stopped working since v16 or maybe v18 (I don't remember off the top of my head, and I don't know why this changed).

    I'm pretty sure the problem would be fixed if the Wasm wasn't bundled as a large base64 string, but I don't know whether that'd break existing uses of binaryen.js.

  2. CountBleck commented on Jul 16, 2024

    @CountBleck
    Member

    @lastmjs after playing around with fnm, Node v15.14.0 prints out the large stack trace, but using --enable-source-maps, I get this instead:

    TypeError: binaryen.createModule is not a function
        at file:///home/lordblumiere/Projects/bjstest/index.js:3:25
        at <anonymous> (<anonymous>)
    

    This doesn't work for v16.20.2, however; --enable-source-maps does nothing to fix the issue.

  3. CountBleck commented on Jul 16, 2024

    @CountBleck
    Member

    It seems to have broken between v16.17.1 and v16.18.0.

  4. kripken commented on Jul 18, 2024

    @kripken
    Collaborator

    With WebAssembly/binaryen#6764 landed, this should be fixed in the next build of binaryen.js, but please verify that and let me know if not.

  5. MaxGraey commented on Apr 20, 2026

    @MaxGraey
    Member

    I think this issue has already been resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions