Skip to Content
Working with the codebaseManage Dependencies

Manage dependencies

Use npx expo install to add packages with versions compatible with your Expo SDK. NativeExpress uses yarn to install and lock dependencies.

Install a package

npx expo install <package-name>

Expo selects a compatible version for packages it knows about and uses the project’s package manager. For other packages, check the library’s React Native and Expo requirements. See the Expo CLI reference .

Remove a package

yarn remove <package-name>

Remove its imports and any config-plugin entry in app.config.js too.

Update a package

For a package whose version is managed by Expo, run npx expo install with its name. To select a version of another dependency explicitly:

npx expo install <package-name>@<version>

Check the package’s release notes before a major-version change. An explicit @latest can select a version your current SDK does not support.

Check compatibility

npx expo install --check yarn expo:doctor

--check reports mismatched package versions. expo:doctor runs npx expo-doctor to inspect the broader project configuration.

To apply Expo’s compatible versions:

npx expo install --fix

Review the changes to package.json and yarn.lock before committing them. The project’s expo.install.exclude list contains @sentry/react-native, so review that package’s compatibility separately rather than expecting this check to select its version.

Verify

Run the project checks and open the affected feature. Adding, removing or updating native code or a config plugin requires a new development build.

If Metro is serving stale JavaScript after the update, restart it with a cleared cache:

npx expo start --clear
Last updated on