Open
Description
I followed the official installation instructions for the Amplitude React Native SDK in my Expo app
📄 Docs: Amplitude React Native SDK
Expected Behavior
The SDK should initialize correctly and allow event tracking.
ℹ️ Note: I’m not using Expo Go. The app runs in a development build.
What I implemented:
1. Initialization
2. Event Tracking
Current Behavior
The SDK throws an error trying to access a property on undefined
.
Error Screenshot
Possible Solution
I investigated the SDK source and found that PluginType
was undefined
where PluginType.BEFORE
was being accessed.
🔧 Fix (Temporary Workaround)
- I commented out the existing
PluginType
reference. - Then I manually defined
PluginType
right where the crash occurred. - After this, the SDK started working, and events appeared on the Amplitude dashboard.
Before Modification
After Modification
Terminal Output
Event Received in Dashboard
Steps to Reproduce
- Follow the official Amplitude SDK installation guide.
- Set up the SDK in an Expo development build (not Expo Go).
- Run the app with the following environment:
- React Native: 0.79.3
- Expo SDK: 53.0.10
- Node.js: 20.16.0
- Eas-cli: 15.0.12
Environment
- JS SDK Version: @amplitude/analytics-react-native:^1.4.13
- Installation Method: npm
- React Native: 0.79.3
- Expo SDK: 53.0.10
- Eas-cli: 15.0.12