@sentry/remix exports ErrorBoundary in its types but it is only present in the browser, not in node #16298
Open
3 tasks done
Content-Length: 244519 | pFad | http://github.com/getsentry/sentry-javascript/issues/16298
02Fetched URL: http://github.com/getsentry/sentry-javascript/issues/16298
Alternative Proxies:
Is there an existing issue for this?
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
Steps to Reproduce
@sentry/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 ifErrorBoundary
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/
The text was updated successfully, but these errors were encountered: