Next.js Discord

Discord Forum

Error logging - is horrible!!

Unanswered
Asian black bear posted this in #help-forum
Open in Discord
Avatar
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

Avatar
Asian black bear
And that "junk" is called a stack trace and it is imperative to finding the actual source of errors.
Avatar
@B33fb0n3 normally the actual error is on the first line of the error. If you share the full error we can help you better
Avatar
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.
Avatar
@Asian black bear And that "junk" is called a stack trace and it is imperative to finding the actual source of errors.
Avatar
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?
Avatar
@Asian black bear solved?
Avatar
@B33fb0n3 <@999484225348698233> solved?
Avatar
Asian black bearOP
nope :S
Avatar
@Asian black bear nope :S
Avatar
what else do you need to resolve your issue?
Avatar
@B33fb0n3 what else do you need to resolve your issue?
Avatar
Asian black bearOP
oh to just hide the unnecessary logs
Avatar
@Asian black bear oh to just hide the unnecessary logs
Avatar
wait until react19 is stable and then change your version inside your package.json to "19" instead of "19.0.0-rc-cd227..."
Avatar
also if you use ansi escape codes to color your msg, it can be easier to find