---
title: "Expo"
description: "Upload source maps for native Expo releases and EAS Update."
url: https://docs.sentry.io/platforms/react-native/sourcemaps/uploading/expo/
---

# Expo | Sentry for React Native

Sentry's React Native SDK works out of the box with Expo applications. To see readable stack traces in the product, you must upload source maps to Sentry. This guide explains how to upload source maps for Expo applications.

## [Prerequisites](https://docs.sentry.io/platforms/react-native/sourcemaps/uploading/expo.md#prerequisites)

* [Sign up for an account](https://sentry.io/signup/)
* [Migrate from `sentry-expo` to `@sentry/react-native`](https://docs.sentry.io/platforms/react-native/migration/sentry-expo.md)
* [Set up Sentry React Native SDK](https://docs.sentry.io/platforms/react-native/manual-setup/expo.md) version 5.16.0-alpha.4 or newer

## [Common Setup](https://docs.sentry.io/platforms/react-native/sourcemaps/uploading/expo.md#common-setup)

To upload source maps, the Sentry Expo Plugin and the Sentry Metro Plugin need to be added to the Expo application.

### [Add the Sentry Expo Plugin](https://docs.sentry.io/platforms/react-native/sourcemaps/uploading/expo.md#add-the-sentry-expo-plugin)

To ensure bundles and source maps are automatically uploaded during the local and EAS native applications builds, add the `@sentry/react-native/expo` config plugin to the Expo application configuration:

```javascript
{
  "expo": {
    "plugins": [
      [
        "@sentry/react-native/expo",
        {
          "url": "https://sentry.io/",
          "note": "Use SENTRY_AUTH_TOKEN env to authenticate with Sentry.",
          "project": "___PROJECT_SLUG___",
          "organization": "___ORG_SLUG___"
        }
      ]
    ]
  }
}
```

`npx expo install` adds the bare `@sentry/react-native` to the plugins array. Both `@sentry/react-native` and `@sentry/react-native/expo` are valid plugin paths. Expo resolves them the same way.

Add auth token to your environment:

```bash
# DO NOT COMMIT YOUR AUTH TOKEN
export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
```

### [Add the Sentry Metro Plugin](https://docs.sentry.io/platforms/react-native/sourcemaps/uploading/expo.md#add-the-sentry-metro-plugin)

To ensure unique Debug IDs are assigned to the generated bundles and source maps, add the Sentry Metro Plugin to the configuration:

```javascript
// const { getDefaultConfig } = require("expo/metro-config");
const { getSentryExpoConfig } = require("@sentry/react-native/metro");

// const config = getDefaultConfig(__dirname);
const config = getSentryExpoConfig(__dirname);

module.exports = config;
```

## [Automatic Upload for Release](https://docs.sentry.io/platforms/react-native/sourcemaps/uploading/expo.md#automatic-upload-for-release)

When the Sentry Expo Plugin `@sentry/react-native/expo` and the Sentry Metro Plugin are added to your application configuration, source maps for the native builds are uploaded automatically during EAS Builds and when building the native application release locally using `npx expo prebuild`. Because symbolication is already handled by the Metro dev server, automatic uploading of source maps for debug builds is disabled.

## [Manual Upload for EAS Updates](https://docs.sentry.io/platforms/react-native/sourcemaps/uploading/expo.md#manual-upload-for-eas-updates)

To upload source maps for EAS Updates and `npx expo export`, set up the Sentry Expo Plugin, the Sentry Metro plugin and execute the `sentry-expo-upload-sourcemaps` command.

### [Create Update](https://docs.sentry.io/platforms/react-native/sourcemaps/uploading/expo.md#create-update)

To create an update for the application use the following command:

```bash
# npx expo export --dump-sourcemap
eas update
```

### [Upload Source Maps](https://docs.sentry.io/platforms/react-native/sourcemaps/uploading/expo.md#upload-source-maps)

To upload source maps for all platforms use the following command:

```bash
SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___ \
npx sentry-expo-upload-sourcemaps dist
```

To upload source maps without expo plugin (bare workflow):

```bash
SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___ \
SENTRY_PROJECT=___PROJECT_SLUG___ \
SENTRY_ORG=___ORG_SLUG___ \
SENTRY_URL=https://sentry.io/ \
npx sentry-expo-upload-sourcemaps dist
```

#### [Notes](https://docs.sentry.io/platforms/react-native/sourcemaps/uploading/expo.md#notes)

* `dist` is the default output directory of `eas update`.
* Sentry Org, Sentry Project, and Sentry Url will be loaded from the expo plugin config (app.json / app.config.js) if the environment variable isn't set.
* Uploaded source maps have no associated releases. This is expected as updates can apply to multiple releases.

## [Notes](https://docs.sentry.io/platforms/react-native/sourcemaps/uploading/expo.md#notes-1)

For a guide on how to manually upload source maps for Expo application releases, see the [Expo (Advanced)](https://docs.sentry.io/platforms/react-native/sourcemaps/uploading/expo-advanced.md) source maps docs.
