Skip to main content
Add FlowPilot to your Expo app with npm or yarn and install the peer dependencies it builds on. The package is @flowpilotjs/react-native-sdk, published publicly on npm.

Requirements

Requirements
  • Expo SDK 51+ (managed or bare workflow)
  • React Native 0.74+
  • React 18+
  • TypeScript 5.4+ (optional, but recommended)
The SDK ships no native modules of its own. It is pure JS/TypeScript and relies on peer dependencies you install in your app: react-native-webview (required — flows render in it), plus expo-image, expo-font, expo-haptics, expo-linking, expo-file-system, expo-secure-store, expo-store-review and react-native-safe-area-context. Upgrading from 1.x: react-native-reanimated, react-native-svg, @react-native-community/slider, lottie-react-native and expo-linear-gradient are no longer needed — they belonged to the renderer 2.0 replaced — and react-native-webview changed from optional to required.

Steps

1

Install the SDK package

2

Install the peer dependencies

The SDK declares its Expo modules as peer dependencies, so you install them in your app. Use npx expo install (not plain npm install) so Expo picks versions that match your SDK version.
react-native-webview is required: flows are drawn by the FlowPilot runtime, which lives in a WebView. The rest are lazy-loaded with require() on first use, so a missing one degrades gracefully (no haptics, no disk cache) instead of crashing at import. Install all of them anyway so every feature works.
3

Rebuild and import

After adding the plugin, do a clean start so the change takes effect. Then import the SDK where you use it.

Wrap your app in a safe-area provider

The renderer reads safe-area insets through react-native-safe-area-context. If your app is not already wrapped in a SafeAreaProvider, add one near the root so flows can lay out around the notch and home indicator.

Notes

  • No native modules of its own. The SDK is pure JS/TypeScript. It runs in the Expo managed workflow without any custom native code or config plugin. Its only native code comes from the peer dependencies, which are all standard Expo modules.
  • flowpilot-export is a build-time CLI, not part of your bundle. The package also ships a Node executable (flowpilot-export) that snapshots a flow into an offline bundle. You run it with npx flowpilot-export on a dev machine or in CI; it is never imported by your app at runtime. See Offline and bundled flows.

Common mistakes

  • Using npm install for the peer dependencies. Use npx expo install so the Expo module versions match your Expo SDK version. Mismatched native module versions are a common source of build errors.
  • Forgetting react-native-webview. Without it the SDK cannot present anything; it says so in the log rather than showing a blank screen.
  • Not doing a clean rebuild after adding the plugin. Babel caches; run npx expo start --clear (or rebuild your dev client) so the plugin is applied.
  • No SafeAreaProvider. Without one, useSafeAreaInsets returns zeros and flows can render under the status bar or home indicator.

Troubleshooting

  • Nothing appears and the log says the runtime cannot start. react-native-webview is missing, or a dev client was not rebuilt after adding it. Run npx expo install react-native-webview, then npx expo start --clear (or npx expo prebuild for a bare/dev-client workflow).
  • Unable to resolve module expo-... A peer dependency is not installed. Re-run the npx expo install ... command above.
  • Type errors importing the SDK. Confirm TypeScript 5.4+ and that @flowpilotjs/react-native-sdk resolved into node_modules.