vercel / pkg

Package your Node.js project into an executable
https://npmjs.com/pkg
MIT License
24.3k stars 1.01k forks source link

The backtrace of the generated executable is weird #759

Closed supertim-chen closed 3 years ago

supertim-chen commented 5 years ago

OS: Ubuntu 18.04.2 LTS node v10.16.0 npm v6.9.0 pkg v4.4.0 The command to generated the executable: "pkg --targets node10-linux-x64 --output elf_filename ."

I have the following code in aaaa.js. const err = new Error('Test backtrace'); console.error(err);

The console output: Error: Test backtrace at /snapshot/aaaa.js:0:0 at /snapshot/edge/node_modules/amqplib/callback_api.js:15:23 at /snapshot/edge/node_modules/amqplib/lib/connect.js:162:9 at succeed (/snapshot/edge/node_modules/amqplib/lib/connection.js:274:5) at onOpenOk (/snapshot/edge/node_modules/amqplib/lib/connection.js:253:5) at /snapshot/edge/node_modules/amqplib/lib/connection.js:166:32 at /snapshot/edge/node_modules/amqplib/lib/connection.js:160:12 at Socket.recv (/snapshot/edge/nodemodules/amqplib/lib/connection.js:498:12) at Object.onceWrapper (events.js:277:13) at Socket.emit (events.js:189:13) at emitReadable (_stream_readable.js:535:12) at process._tickCallback (internal/process/next_tick.js:63:19)

The line number of the top of the stack is missed.

n42k commented 5 years ago

I have the same problem. Have you made any progress on this issue?

node v8.16.0 npm v6.4.1 pkg v4.4.0

Used the following command to generate the executable: pkg server.js --output build/brikkit

events.js:116
    handler.call(self, arg1);
            ^

TypeError: Cannot read property 'Symbol(Symbol.iterator)' of object
    at StateMachineJoin.parseLine (/snapshot/brikkit/sm_join.js:0:0)
    at Brikkit._stateMachineJoinHandleLine (/snapshot/brikkit/brikkit.js:0:0)
    at Brikkit._handleBrickadiaLine (/snapshot/brikkit/brikkit.js:0:0)
    at constructor._brickadia.on.line (/snapshot/brikkit/brikkit.js:0:0)
    at Interface.constructor.outRl.on.line (/snapshot/brikkit/brickadia.js:0:0)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:280:10)
    at Interface._normalWrite (readline.js:422:12)
    at Socket.ondata (readline.js:139:10)
github-actions[bot] commented 3 years ago

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

github-actions[bot] commented 3 years ago

This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.