unjs / consola

🐨 Elegant Console Logger for Node.js and Browser
Other
6.12k stars 175 forks source link

Logging does not work in worker threads #173

Closed danielroe closed 1 year ago

danielroe commented 1 year ago

Environment

Consola v3.0.0, https://github.com/nuxt/nuxt

Reproduction

https://github.com/nuxt/nuxt/pull/20194

Describe the bug

process.stdout.fd is not defined in worker threads and we get this error:

The "fd" argument must be of type number. Received undefined

Additional context

https://github.com/unjs/consola/blob/d77286a6ffeab9c8e1eca0fac423368045f8fef4/src/utils/stream.ts#L5

Logs

No response