Next.js Discord

Discord Forum

Error logging - is horrible!!

Unanswered
Asian black bear posted this in #help-forum
Open in Discord
Asian black bearOP
whenever something goes wrong, i keep getting awful loggin in the terminal that makes it too hard to find what went wrong.

is there is a way to hide all the junk logging ?

example of junk logging
ode_modules\.pnpm\next@15.0.0_react-dom@19.0.0-rc-cd22717c-20241013_react@19.0.0-rc-cd22717c-20241013__react@19.0.0-rc-cd22717c-20241013\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:98:30214)

I keep getting what looks like 100s of lines like this, I cant even find my console log to debug the issue.
I just wanna see what went wrong in my scripts.

12 Replies

Asian black bear
And that "junk" is called a stack trace and it is imperative to finding the actual source of errors.
@B33fb0n3 normally the actual error is on the first line of the error. If you share the full error we can help you better
Asian black bearOP
there is not a certain bug that Im facing, its just in general, I never needed to look into all that , I just want to hide it and focus on the real issue.
@Asian black bear And that "junk" is called a stack trace and it is imperative to finding the actual source of errors.
Asian black bearOP
I never needed to look into all that , I just want to hide it and focus on the real issue, is it possible to just hide all the stack trace unless i specify otherwise?
@Asian black bear solved?
@B33fb0n3 <@999484225348698233> solved?
Asian black bearOP
nope :S
@Asian black bear nope :S
what else do you need to resolve your issue?
@B33fb0n3 what else do you need to resolve your issue?
Asian black bearOP
oh to just hide the unnecessary logs
@Asian black bear oh to just hide the unnecessary logs
wait until react19 is stable and then change your version inside your package.json to "19" instead of "19.0.0-rc-cd227..."
also if you use ansi escape codes to color your msg, it can be easier to find