Repository navigation
expo-router integration requires expo-router/build/global-state/router-store, but it was removed in SDK 58 #6901
Copy link
Copy link
Open
Labels
Description
What React Native libraries do you use?
Expo Router, RN New Architecture, React Native Web, Expo Web
Are you using sentry.io or on-premise?
sentry.io (SaS)
Are you using any other error monitoring solution alongside Sentry?
No
Other Error Monitoring Solution Name
No response
@sentry/react-native SDK Version
8.28.0
How does your development environment look like?
- pnpm 11.28.4
- Node.js v26.8.1
- Expo SDK 58.0.14
- expo-router@58.0.23
- react-native@0.88.0
- metro@0.87.1
Sentry.init()
initSentry({
dsn: config.sentryDsn,
// https://docs.sentry.io/platforms/react-native/data-management/data-collected/
sendDefaultPii: true,
// https://docs.sentry.io/platforms/react-native/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
profilesSampleRate: 1.0,
// https://docs.sentry.io/platforms/react-native/logs/
enableLogs: true,
replaysOnErrorSampleRate: 1.0,
replaysSessionSampleRate: 0.1,
integrations: [
mobileReplayIntegration(),
// https://docs.sentry.io/platforms/react-native/guides/expo/tracing/instrumentation/expo-router/
expoRouterIntegration({
enableTimeToInitialDisplay: true,
enablePrefetchTracking: true,
}),
// NOTE(skip): if we don't pass this, the `sentry-trace` header that the
// server receives won't actually match the trace ID on the client. dunno
// why!
reactNativeTracingIntegration({
traceFetch: true,
traceXHR: true,
}),
extraErrorDataIntegration({depth: 3, captureErrorCause: true}),
],
enableNativeFramesTracking: true,
_experiments: {
// https://docs.sentry.io/platforms/react-native/guides/expo/tracing/instrumentation/automatic-instrumentation/#standalone-app-start-tracing
enableStandaloneAppStartTracing: true,
},
});Steps to Reproduce
- Create an Expo SDK 58 app. Integrate
@sentry/react-nativenormally. - Launch Expo app:
expo start(Web/iOS/Android does not matter.)
Expected Result
(No extraneous output.)
Actual Result
WARN The package $REPO/node_modules/expo-router contains an invalid package.json configuration. Consider raising this issue with the package maintainer(s).
Reason: The resolution for "$REPO/node_modules/expo-router/build/global-state/router-store" defined in "exports" is $REPO/node_modules/expo-router/build/global-state/router-store.js, however this file does not exist. Falling back to hierarchical resolution for backwards compatibility.
WARN The package $REPO/node_modules/expo-router contains an invalid package.json configuration. Consider raising this issue with the package maintainer(s).
Reason: The resolution for "$REPO/node_modules/expo-router/build/global-state/router-store" defined in "exports" is $REPO/node_modules/expo-router/build/global-state/router-store.js, however this file does not exist. Falling back to file-based resolution.
WARN The package $REPO/node_modules/expo-router contains an invalid package.json configuration. Consider raising this issue with the package maintainer(s).
Reason: The resolution for "$REPO/node_modules/expo-router/build/global-state/router-store" defined in "exports" is $REPO/node_modules/expo-router/build/global-state/router-store.js, however this file does not exist. Falling back to file-based resolution.
WARN The package $REPO/node_modules/expo-router contains an invalid package.json configuration. Consider raising this issue with the package maintainer(s).
Reason: The resolution for "$REPO/node_modules/expo-router/build/global-state/router-store" defined in "exports" is $REPO/node_modules/expo-router/build/global-state/router-store.js, however this file does not exist. Falling back to hierarchical resolution for backwards compatibility.
WARN The package $REPO/node_modules/expo-router contains an invalid package.json configuration. Consider raising this issue with the package maintainer(s).
Reason: The resolution for "$REPO/node_modules/expo-router/build/global-state/router-store" defined in "exports" is $REPO/node_modules/expo-router/build/global-state/router-store.js, however this file does not exist. Falling back to file-based resolution.
WARN The package $REPO/node_modules/expo-router contains an invalid package.json configuration. Consider raising this issue with the package maintainer(s).
Reason: The resolution for "$REPO/node_modules/expo-router/build/global-state/router-store" defined in "exports" is $REPO/node_modules/expo-router/build/global-state/router-store.js, however this file does not exist. Falling back to file-based resolution.
WARN The package $REPO/node_modules/expo-router contains an invalid package.json configuration. Consider raising this issue with the package maintainer(s).
Reason: The resolution for "$REPO/node_modules/expo-router/build/global-state/router-store" defined in "exports" is $REPO/node_modules/expo-router/build/global-state/router-store.js, however this file does not exist. Falling back to file-based resolution.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsNo status
Activity
linear-code commentedon Oct 16, 2026
RN-831
slice commentedon Oct 16, 2026
It looks like the expo-router integration attempts to require a private module:
sentry-react-native/packages/core/src/js/tracing/expoRouterStore.ts
Line 52 in e6f7b49
However, this module was removed recently:
expo/expo@b418a8a
This leads to warnings from Metro, however it doesn't actually break Sentry. Error reporting, logging, etc. all work as intended, seemingly. Just wanted to flag.
slice commentedon Oct 16, 2026
I have not tested in depth, but I would presume that this breaks the expo-router integration and updating on Sentry's side is needed.
dub578 commentedon Oct 17, 2026
Confirming on the same versions (8.28.0, expo-router 58.0.23). It’s more than the router-store path. Expo SDK 58 also removed the unsafe_action event (SDK 57 to 58 migration guide), which reactNavigationIntegration uses to start navigation spans. expo/expo#49408 moved navigation events to after the next render, so state and the action events all fire after the destination screen’s first fetch. So even with the store path fixed, no navigation span can start on SDK 58. I worked around it by starting an idle navigation span before calling router.push / replace.
alwx commentedon Oct 19, 2026
Hello there, and thanks for reporting. We've seen your request and added it to our triage queue.
We'll review it shortly and follow up if we need more information or once next steps are clearer.