From 0b170214fda970bacb5d4fcd1c52343fd5ca49b2 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 7 Apr 2026 11:59:41 +0200 Subject: [PATCH 1/2] docs(react-native): Document SENTRY_PROJECT_ROOT env var for monorepo setups Adds SENTRY_PROJECT_ROOT to the environment variables list in both the source maps and debug symbols upload sections of the React Native manual setup guide. Ref: getsentry/sentry-react-native#2880 Co-Authored-By: Claude Opus 4.6 (1M context) --- .../react-native/manual-setup/manual-setup.mdx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/platforms/react-native/manual-setup/manual-setup.mdx b/docs/platforms/react-native/manual-setup/manual-setup.mdx index bf994951660fc..c6c37b7e5547c 100644 --- a/docs/platforms/react-native/manual-setup/manual-setup.mdx +++ b/docs/platforms/react-native/manual-setup/manual-setup.mdx @@ -88,8 +88,16 @@ export SENTRY_CLI_RN_XCODE_EXTRA_ARGS="--extra --flags" export SOURCE_MAP_PATH="path/to/source-maps" # From where collect-modules should read modules export SENTRY_COLLECT_MODULES="path/to/collect-modules.sh" export MODULES_PATHS="../node_modules,../my-custom-module" + +export SENTRY_PROJECT_ROOT="/path/to/packages/mobile" # Override project root for monorepo setups ``` + + +If you're using a monorepo (for example, NX or Turborepo), the script may resolve the project root incorrectly due to symlinked `node_modules`. Set `SENTRY_PROJECT_ROOT` to the absolute path of your React Native package to fix build failures caused by incorrect path resolution. + + + By default, uploading of source maps for debug simulator builds is disabled for speed reasons. If you want to generate source maps for debug builds, you can pass `--allow-fetch` as a parameter to `SENTRY_CLI_RN_XCODE_EXTRA_ARGS` in the above mentioned script. ### Configure Automatic Debug Symbols Upload @@ -110,6 +118,8 @@ export SENTRY_INCLUDE_NATIVE_SOURCES=true # Upload native iOS sources export SENTRY_CLI_EXECUTABLE="path/to/@sentry/cli/bin/sentry-cli" export SENTRY_CLI_EXTRA_ARGS="--extra --flags" # Extra arguments for sentry-cli in all build phases export SENTRY_CLI_DEBUG_FILES_UPLOAD_EXTRA_ARGS="--extra --flags" + +export SENTRY_PROJECT_ROOT="/path/to/packages/mobile" # Override project root for monorepo setups ``` For more information about what options to use in `SENTRY_CLI_DEBUG_FILES_UPLOAD_EXTRA_ARGS` visit the [Sentry CLI Apple Debug Symbols](/platforms/apple/dsym/#sentry-cli) documentation. From 4f9f32c033859fc8cee09b5bbeeb8944b868d802 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 7 Apr 2026 12:38:18 +0200 Subject: [PATCH 2/2] fix: Use Alert component instead of Note Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/platforms/react-native/manual-setup/manual-setup.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/platforms/react-native/manual-setup/manual-setup.mdx b/docs/platforms/react-native/manual-setup/manual-setup.mdx index c6c37b7e5547c..f52adf0503aaf 100644 --- a/docs/platforms/react-native/manual-setup/manual-setup.mdx +++ b/docs/platforms/react-native/manual-setup/manual-setup.mdx @@ -92,11 +92,11 @@ export MODULES_PATHS="../node_modules,../my-custom-module" export SENTRY_PROJECT_ROOT="/path/to/packages/mobile" # Override project root for monorepo setups ``` - + If you're using a monorepo (for example, NX or Turborepo), the script may resolve the project root incorrectly due to symlinked `node_modules`. Set `SENTRY_PROJECT_ROOT` to the absolute path of your React Native package to fix build failures caused by incorrect path resolution. - + By default, uploading of source maps for debug simulator builds is disabled for speed reasons. If you want to generate source maps for debug builds, you can pass `--allow-fetch` as a parameter to `SENTRY_CLI_RN_XCODE_EXTRA_ARGS` in the above mentioned script.