Troubleshooting
Common issues with @mhpdev/react-native-haptics and how to resolve them.
The native module cannot be found
The library is built on Turbo Modules and only supports the New Architecture. If the native module is missing at runtime, verify that the New Architecture is enabled — React Native 0.76+ has it enabled by default; on React Native 0.68–0.75 you must enable it first. See the React Native New Architecture guide.
Expo Go is not supported
The library requires a native build. In Expo projects, run npx expo prebuild (see Installation) and use a development build instead of Expo Go.
E_INVALID_STYLE or E_INVALID_TYPE
These rejections mean the argument did not match a known value:
impactonly accepts'light' | 'medium' | 'heavy' | 'soft' | 'rigid'.notificationonly accepts'success' | 'warning' | 'error'.androidHapticsonly accepts theAndroidHapticsFeedbackvalues listed in the API reference.
The rejection message lists all allowed values, so check the string for typos.
E_NO_VIEW on Android
androidHaptics triggers feedback through the current activity's view (performHapticFeedback). If there is no current activity — for example while the app is backgrounded or during a transition — the call rejects with E_NO_VIEW. Trigger haptics while the app is in the foreground, or catch the rejection and retry later.
An Android effect does nothing on older devices
Effects that rely on newer HapticFeedbackConstants values have API requirements (see the table in Android-specific effects). On devices below the required API, the library falls back to virtual-key instead of failing — the sensation differs, but the call still resolves. If an effect feels too weak on a device, prefer an effect with a lower API requirement (such as long-press or keyboard-tap).
soft and rigid behave differently across platforms
These impact styles are UIImpactFeedbackStyle values introduced in iOS 13.0+. On Android every impact style is simulated with a vibration effect, so the feel does not map one-to-one with iOS.
Vibration does not play at all
Haptics depend on device settings: check that vibration is enabled in the device's sound settings and that any system "haptic feedback" toggle is on. On Android, the system may ignore haptic requests depending on the device's touch-feedback setting.
Still stuck?
- Search the issue tracker and open a new issue if the problem persists.
- Check the releases page for version-specific notes and fixes.