Skip to content

Sentry package incompatible with latest React Router releaseΒ #17912

@jdmcd

Description

@jdmcd

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/react-router

SDK Version

^10.19.0

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

No response

Steps to Reproduce

  1. Install a React Router project with latest (v ^7.9.4)
  2. Add @sentry/react-router
  3. Attempt to run react-router build

Build will fail with the error:

  loc: {
    column: 9,                                                                                                                                                                    file: 'root.tsx',
    line: 1
  },
  frame: '1: import { UNSAFE_withComponentProps as _UNSAFE_withComponentProps, UNSAFE_withErrorBoundaryProps as _UNSAFE_withErrorB...\n' +
    '            ^\n' +
    '2: import { jsx, jsxs } from "react/jsx-runtime";\n' +
    '3: import * as Sentry from "@sentry/react-router";',

This is because Sentry is attempting to use UNSAFE_withComponentProps which is no longer unsafe in the latest version

Expected Result

Sentry should use the stable version of those APIs

Actual Result

Sentry uses the unstable version, so React Router cannot be upgraded

Additional Context

Tip: React with πŸ‘ to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions