Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/remix
SDK Version
9.18.0
Framework Version
Remix 2.16.5
Link to Sentry event
No response
Reproduction Example/SDK Setup
import { ErrorBoundary } from "@sentry/remix";
Steps to Reproduce
- Import and use ErrorBoundary from
@sentry/remix
- Use remix
Expected Result
The ErrorBoundary component is available in both client and SSR contexts, the same as it was in Sentry 8.x
Actual Result
ErrorBoundary is not exported when you're in a node.js environment because of the different entrypoint, and so you fail in prod without a TypeScript error.
This is a pretty tricky way to handle typescript exports: I would sort of understand if there were entrypoints like @sentry/remix/client
and @sentry/remix/node
, but given that it's one package you import, the types are kind of "lying" about what's actually available: I write isomorphic code as if ErrorBoundary
exists, but it only exists in one environment (the browser) and crashes the other (node).
This change also is, afaict, not mentioned in the 9.x release notes: https://github.com/getsentry/sentry-javascript/releases/tag/9.0.0 or the migration guide: https://docs.sentry.io/platforms/javascript/guides/remix/migration/v8-to-v9/
Metadata
Metadata
Assignees
Type
Projects
Status