Registry / devops / expo-modules-jsi

expo-modules-jsi

JSON →
library56.0.7jsnpmunverified

The JavaScript Interface (JSI) for Expo Modules in React Native, providing a native-to-JS bridge with synchronous calls and low overhead. Current stable version is 0.56.0.7. Released alongside Expo SDK updates, with a monthly cadence. Differentiator: enables high-performance native module communication without the asynchronous bridge overhead of the standard React Native bridge. Used internally by Expo modules that require direct synchronous access to native APIs.

npm install expo-modules-jsi
INSTALL
IMPORT
SIG · EXPO-MODULES-JSI
E
expo-modules-jsi
devopsjavascriptv56.0.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ExpoModulesJSI
import { ExpoModulesJSI } from 'expo-modules-jsi'
import ExpoModulesJSI from 'expo-modules-jsi'
Named export only; default import does not exist. CJS: const { ExpoModulesJSI } = require('expo-modules-jsi').
installJSI
import { installJSI } from 'expo-modules-jsi'
import { installJSI } from 'expo-modules-core'
installJSI is a named export from expo-modules-jsi, not from expo-modules-core.
JSIHostObject
import type { JSIHostObject } from 'expo-modules-jsi'
import { JSIHostObject } from 'expo-modules-jsi'
Type import only; JSIHostObject is a TypeScript type, not a runtime value.

Shows how to install JSI and call a synchronous native method using Expo Modules JSI in a React Native app.

// Ensure you have react-native installed import { ExpoModulesJSI, installJSI } from 'expo-modules-jsi'; // Install JSI bindings (must be called before any JSI usage) const jsi = installJSI(); // Access JSI host object to call native methods synchronously const result = jsi.callNativeSync('MyModule', 'myMethod', [42]); console.log(result); // Cleanup when done (optional) jsi.uninstall();
Debug
Known issues
breakingBreaking change in SDK 50: 'installJSI' now returns an object instead of void. Old code that does not capture the return value will break when calling methods.
fix
Update to const jsi = installJSI(); and use jsi.callNativeSync(...) instead of relying on global side effects.
affects: >=0.50.0
gotchaMust call 'installJSI' before any JSI operations or calls to native modules. Calling JSI methods before installation will silently fail or throw.
fix
Always invoke installJSI() at the start of your app initialization, before any module calls.
affects: >=0.0.0
deprecatedThe global JSI host object is deprecated in favor of the returned object from installJSI. Accessing global.JSIHostObject is unsupported and may be removed.
fix
Use the return value of installJSI() instead of global.JSIHostObject.
affects: >=0.50.0
gotchaOnly works with Hermes JavaScript engine on Android and JSC on iOS. Does not support all custom engines.
fix
Ensure your React Native app uses Hermes (Android) or JavaScriptCore (iOS). Check your podfile and gradle config.
affects: >=0.0.0
breakingRemoved synchronous callbacks in SDK 48: callNativeSync no longer supports callback-based APIs. Use only for synchronous native methods.
fix
Convert callback-based native modules to synchronous methods or use async alternatives (e.g., expo-modules-core's EventEmitter).
affects: >=0.48.0
Errors
Common errors & fixes
TypeError: Cannot read property 'callNativeSync' of undefined
installJSI() was not called or the returned object was not used.
fix
Call const jsi = installJSI(); then use jsi.callNativeSync(...).
Module not found: Can't resolve 'expo-modules-jsi'
Package not installed or not linked correctly in a bare React Native project.
fix
Run npm install expo-modules-jsi and ensure your project has the correct Expo SDK version. For bare projects, run npx pod-install ios.
Invariant Violation: JSI host object already installed
installJSI() was called more than once.
fix
Ensure installJSI() is called only once during app startup. Guard with a flag if necessary.
TypeError: (0 , _expoModulesJsi.installJSI) is not a function
Wrong import or package version mismatch (e.g., importing from expo-modules-core).
fix
Use import { installJSI } from 'expo-modules-jsi'. Check package version compatibility with Expo SDK.
Upgrade
Version history
56.0.7latest on npm
Audit
Dependencies
react-nativerequiredpeer dependency; provides the React Native environment required for JSI integration
Agent activity
4 hits · last 30 days
node
4
Resources