unjs / consola

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

`stdout` is undefined in worker context #115

Closed manniL closed 3 years ago

manniL commented 3 years ago

https://github.com/unjs/consola/blob/4477e87a5153d31d22a2692565959d90599a6b61/src/reporters/basic.js#L63

Hey 👋🏻 When using consola with Nitro I noticed that errors are being thrown when consola should log messages because stdout seems to be undefined in the worker context.

I think excluding consola from CF builds could be a good idea 🤔

pi0 commented 3 years ago

Consola (node entry) is supposed to only run in NodeJS environment. Nuxt nitro should already have it replaced if not please open an issue in framework :)

manniL commented 3 years ago

Will do and close here 😋