How to get line number in errors?
Hi, we are currently doing this:
to get a vague idea of what the error was, but this doesn't really help you with telling on which line it occurred. Is there a way to achieve this? Logging the trace is kind of pointless as they don't point you to your own procedure.
4 Replies
the trace in
info.error
should work?
info.error.stack
or whatever
if not, it might be that you haven't configured sourcemaps correctlyIm guessing this must be it then, do you have a reference where this is set up correctly that I can compare to?
I do have
sourceMap: true
in tsconfig
.depends how you compile, here's a webpack version
Thank you! Im using Turbopack in Next