You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consola does not work well when logging in the server on Next.js 14:
It DOES work on the client:
I've tried using different imports, but I wanted to see it it was possible to use the fancy reporter with the colors :')
importconsolafrom"consola";//does not workimportconsolafrom"consola/basic";// works without the colorsimportconsolafrom"consola/browser";// works without the colors
It might be my ignorance as to how loggers differ from browser rather than in the server, but shouldn't the server also be able to print colors?
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
I couldn't find a way to import the FancyReport and BasicReport either, so I had to copy them from these files (making sure to install any extra dependencies:
Well, I was asking in the hopes that I don't have to copy paste the implementation of the reporters from the consola source code with only the parts that work well in my case. My issue is not the fact that there are no workarounds. It's the fact that there is a need for a workaround.
Environment
I believe Next.js 14 uses Node v18 (LTS)
I haven't tried in Next.js 13 but I suspect it might get a similar issue
Reproduction
I created a repository to simulate the issue.
You can also check it live via this github codespace:
Describe the bug
Consola does not work well when logging in the server on Next.js 14:
It DOES work on the client:
I've tried using different imports, but I wanted to see it it was possible to use the fancy reporter with the colors :')
It might be my ignorance as to how loggers differ from browser rather than in the server, but shouldn't the server also be able to print colors?
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: