Skip to content

Empty log line on worker error #945

@micon4sure

Description

@micon4sure

Error when trying to create faulty worker

Description

When trying to create a new worker that has errors, an empty log line is printed to the console instead of the actual error.

Replication

For replication, see this repository: https://github.com/teh-mICON/ts_worker_error

run via ts-node start.ts or npm run start

Error when directly invoking worker.ts

$ ts-node worker.ts

/home/micon/.nvm/versions/node/v12.9.1/lib/node_modules/ts-node/src/index.ts:245
    return new TSError(diagnosticText, diagnosticCodes)
           ^
TSError: ⨯ Unable to compile TypeScript:
worker.ts:2:1 - error TS2304: Cannot find name 'asd'.

2 asd();
  ~~~

    at createTSError (/home/micon/.nvm/versions/node/v12.9.1/lib/node_modules/ts-node/src/index.ts:245:12)
    at reportTSError (/home/micon/.nvm/versions/node/v12.9.1/lib/node_modules/ts-node/src/index.ts:249:19)
    at getOutput (/home/micon/.nvm/versions/node/v12.9.1/lib/node_modules/ts-node/src/index.ts:357:34)
    at Object.compile (/home/micon/.nvm/versions/node/v12.9.1/lib/node_modules/ts-node/src/index.ts:415:32)
    at Module.m._compile (/home/micon/.nvm/versions/node/v12.9.1/lib/node_modules/ts-node/src/index.ts:493:43)
    at Module._extensions..js (internal/modules/cjs/loader.js:947:10)
    at Object.require.extensions.<computed> [as .ts] (/home/micon/.nvm/versions/node/v12.9.1/lib/node_modules/ts-node/src/index.ts:496:12)
    at Module.load (internal/modules/cjs/loader.js:790:32)
    at Function.Module._load (internal/modules/cjs/loader.js:703:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:999:10)

Output when Invoking start.ts

$ ts-node start.ts

ts-node start.ts  4.97s user 0.86s system 188% cpu 3.084 total

Additional notes

An empty log line is also created on runtime exception, if code compiled correctly

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions