pino: Calling pino.transport() results in "Error: Not supported"
pino version: ‘7.0.0-rc.1’
$ cat main.js
require("pino").transport({target: "/dev/null"})
$ node main.js
events.js:187
throw er; // Unhandled 'error' event
^
Error: Not supported
at start (/Users/g.crino/pino-poc/node_modules/thread-stream/lib/worker.js:18:39)
at Object.<anonymous> (/Users/g.crino/pino-poc/node_modules/thread-stream/lib/worker.js:42:1)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
at MessagePort.<anonymous> (internal/main/worker_thread.js:139:25)
at MessagePort.emit (events.js:210:5)
at MessagePort.onmessage (internal/worker/io.js:70:8)
Emitted 'error' event on ThreadStream instance at:
at /Users/g.crino/pino-poc/node_modules/thread-stream/index.js:155:16
at processTicksAndRejections (internal/process/task_queues.js:75:11)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (10 by maintainers)
Commits related to this issue
- Make sure that the main thread stays alive to process stdout. This is achieved by hooking into beforeExit in on-exit-leak-free. At that point the event loop is still running so we can catch the most ... — committed to pinojs/pino by mcollina 3 years ago
- Make sure that the main thread stays alive to process stdout. (#1075) * Make sure that the main thread stays alive to process stdout. This is achieved by hooking into beforeExit in on-exit-leak-fr... — committed to pinojs/pino by mcollina 3 years ago
everyone in this thread is awesome
@giuscri This is a really fun bug and exactly the things we are looking to fix in the release candidate phase! Thanks!