Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Express adapter is unable to provide stack traces #6739

Closed
1 task done
DanielSchiavini opened this issue Jun 30, 2023 · 2 comments
Closed
1 task done

Express adapter is unable to provide stack traces #6739

DanielSchiavini opened this issue Jun 30, 2023 · 2 comments

Comments

@DanielSchiavini
Copy link

What version of Remix are you using?

1.17.1

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

  • Create any Remix app
  • Use the express adapter
  • Raise an error in the loader
  • The error stack trace shows a location in the built index.js file, with no relation to the source code

I created an example app here: https://stackblitz.com/edit/remix-run-remix-kyq5df?file=app%2Froutes%2F_index.tsx
Note how the _index file calls null() just to raise an exception.
The stack trace shows only at Object.meta (/home/projects/remix-run-remix-kyq5df/build/index.js:168:16).

Expected Behavior

Remix should allow express to use the .map file generated to find the original source file.
It is extremely important to any application developer to find the source of errors.
Without a stack trace we are left in the dark.

Actual Behavior

The application shows an error in a built file. If you are running a docker container, that build file is not easily accessible and hard to trace back to the original source code.

@kiliman
Copy link
Collaborator

kiliman commented Jun 30, 2023

Hmm.. I see the same thing with the meta function, but errors in loader show the stack trace just fine. I wonder if it's because meta is included in both the server and client bundles.

image

@pcattori
Copy link
Contributor

pcattori commented Aug 4, 2023

Sourcemaps were fixed in #6762 and now errors in meta (and everywhere else) correctly show up with sourcemap'd files:

Image

@pcattori pcattori closed this as completed Aug 4, 2023
@pcattori pcattori moved this from Backlog to Closed in v2 Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Closed
Development

No branches or pull requests

4 participants