Content-Length: 244519 | pFad | http://github.com/getsentry/sentry-javascript/issues/16298

02 @sentry/remix exports ErrorBoundary in its types but it is only present in the browser, not in node · Issue #16298 · getsentry/sentry-javascript · GitHub
Skip to content

@sentry/remix exports ErrorBoundary in its types but it is only present in the browser, not in node #16298

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

Open
3 tasks done
tmcw opened this issue May 14, 2025 · 1 comment
Open
3 tasks done
Assignees

Comments

@tmcw
Copy link

tmcw commented May 14, 2025

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

import { ErrorBoundary } from "@sentry/remix";

Steps to Reproduce

  1. Import and use ErrorBoundary from @sentry/remix
  2. 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/

@andreiborza
Copy link
Member

Hi @tmcw, thanks for writing in. We're looking into why the export was removed. Indeed it wasn't called out in the migration to v9 so the removal was probably unintentional.

cc @onurtemizkan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/getsentry/sentry-javascript/issues/16298

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy