Devin can build, test, and iterate on Expo and React Native apps. This guide walks through how to configure Devin's environment so it's ready to work on your Expo project from the first session.
Expo provides a managed workflow that simplifies React Native development. For Devin, the key advantage is Expo's web preview — Devin can run your app in its built-in browser without needing a physical device or emulator. This means Devin can visually verify UI changes, test navigation flows, and debug layout issues during a session.
First, make sure Devin has access to your repo via Settings > Integrations. Then go to Settings > Devin's Machine and add your Expo repository.
In the Install Dependencies step, use the package manager your project uses:
# npm (default for most Expo projects)
npm install
# yarn
yarn install
# pnpm
pnpm installIf your project uses a specific Node.js version, install it first:
nvm install 20
nvm use 20
npm installIn the Maintain Dependencies step, use the same install command. Optionally add npx expo install --check to fix any mismatched dependency versions:
npm install
npx expo install --checkIf your project uses ESLint (most Expo projects created with create-expo-app include it):
npx expo lintOr if you have a custom lint script in package.json:
npm run lintMost Expo projects use Jest via jest-expo:
npm testThis is where Expo shines for Devin. Use the web preview so Devin can interact with your app in its browser:
npx expo start --webAdd any project-specific context Devin should know. For example:
- This project uses Expo Router for file-based navigation
- The app connects to a staging API at https://api.staging.example.com
- Use the test account: test@example.com (password stored in secrets)
- Run `npx expo start --web` to preview UI changes in the browser
If your Expo project uses environment variables (e.g., via .env files with expo-env), you have two options:
Store sensitive values as Secrets and reference them in a .envrc file:
# .envrc in your repo root
export EXPO_PUBLIC_API_URL="https://api.staging.example.com"
export EXPO_PUBLIC_ANALYTICS_KEY="$ANALYTICS_KEY" # references a Devin secretThen run direnv allow in the terminal during environment setup.
Create a .env file in the repo root during environment setup:
EXPO_PUBLIC_API_URL=https://api.staging.example.com
EXPO_PUBLIC_ANALYTICS_KEY=your-key-hereYou don't have to rely solely on the web preview — Devin can share the Expo development server URL so you can open the app on your physical device using the Expo Go app.
When Devin runs npx expo start, the terminal outputs a QR code and an exp:// URL. Ask Devin to share that URL or QR code in the session chat, and you can scan it with the Expo Go app on your phone to see the app running live.
Example prompt:
Your mobile device must be on the same network as Devin's machine, or you can use tunnel mode: `npx expo start --tunnel`. Tunnel mode routes traffic through Expo's servers so your device can connect from any network. Note that `--tunnel` requires `@expo/ngrok` — Devin will install it automatically if it's not already present. This is a great workflow for reviewing UI changes in real time: Devin makes changes, and you see them update live on your device via Expo's fast refresh.Run
npx expo startand share the Expo QR code and URL with me so I can test on my phone.
If your project uses Expo Router, Devin can navigate directly to specific routes via URL in its browser. This is useful for testing specific screens without clicking through the app:
http://localhost:8081/settings
http://localhost:8081/profile/123
Add a note in the Additional Notes step telling Devin about your route structure so it can navigate efficiently.
For projects that use native modules or require a development build, additional setup is needed.
If your project uses native modules that aren't supported in Expo Go, run prebuild during environment setup:
npx expo prebuildTo run Android builds on Devin's machine, you'll need the Android SDK:
# Install during environment setup
sudo apt-get update && sudo apt-get install -y openjdk-17-jdkSet the required environment variables in ~/.bashrc:
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-toolsIf you use EAS Build for production builds, install the EAS CLI and store your Expo token:
# Install EAS CLI during environment setup
npm install -g eas-cliAdd your EXPO_TOKEN as a Secret so Devin can trigger cloud builds:
eas build --platform android --profile preview --non-interactiveHere are some effective prompts for working with Expo projects:
UI changes:
Add a dark mode toggle to the settings screen. Use the existing theme context at
src/contexts/ThemeContext.tsx. Runnpx expo start --weband verify the toggle works in the browser.
New feature:
Create a new "Notifications" tab using Expo Router. Add it to the bottom tab navigator in
app/(tabs)/_layout.tsx. The screen should fetch notifications from the/api/notificationsendpoint and display them in a FlatList.
Bug fix:
The login form on the auth screen doesn't show validation errors. Check
app/(auth)/login.tsxand fix the form validation. Test by running the web preview and trying to submit with an empty email field.
Testing:
Add unit tests for the
useAuthhook insrc/hooks/useAuth.ts. Usejest-expoand mock the AsyncStorage calls. Runnpm testto verify they pass.
If you see warnings like EBADENGINE Unsupported engine during npm install, your Expo project's dependencies require a newer version of Node.js than what's installed on Devin's machine. For example:
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: 'eslint-visitor-keys@5.0.1',
npm warn EBADENGINE required: { node: '^20.19.0 || ^22.13.0 || >=24' },
npm warn EBADENGINE current: { node: 'v22.12.0', npm: '10.8.3' }
npm warn EBADENGINE }
To fix this, update Node in the Install Dependencies step before running npm install:
nvm install 22
nvm use 22
npm installYou should also add the nvm use command to your Maintain Dependencies step so the correct version is used every session:
nvm use 22
npm installIf the repo setup fails with ERROR: Git working directory was not clean in the end, it means npm install modified tracked files — most commonly package-lock.json. This happens when the lockfile was generated with a different npm version or when Expo postinstall scripts modify project files.
Quick fix — add git checkout -- . after npm install to reset any file changes while keeping node_modules intact:
nvm install 22 && nvm use 22 && npm install && git checkout -- .Permanent fix — run npm install locally on your machine, commit the updated package-lock.json, and push. Once the lockfile matches the npm version on Devin's machine, subsequent installs won't produce changes.
If Devin reports that expo is not found, the Expo CLI may not be installed globally. Since Expo SDK 46+, the CLI is included as a local dependency — use npx expo instead of expo directly:
# Use this
npx expo start --web
# Not this
expo start --web- Use the web preview — Always include
npx expo start --webin your run command so Devin can visually verify changes - Reference Expo Router paths — Tell Devin which URL paths to check after making changes
- Store credentials as secrets — API keys, test account passwords, and
EXPO_TOKENshould be in Secrets - Keep dependencies fresh — Use
npx expo install --checkin maintain dependencies to avoid version mismatches - Add knowledge notes — Document your project's architecture, API endpoints, and testing conventions as Knowledge so Devin can reference them across sessions