tursodatabase/turso · error · Error

@tursodatabase/sync-react-native: JSI bindings not found on

Error message

@tursodatabase/sync-react-native: JSI bindings not found on global object. This is a bug.

What it means

After TursoNative.install() returns true, index.ts reads the global __TursoProxy that the native side should have installed. If it is missing while install() claimed success, the runtime is in an inconsistent state — the message itself says 'This is a bug'. Realistic causes are a JS runtime that is not the one where JSI globals live (remote debugging) or duplicate installs across reloads.

Source

Thrown at bindings/react-native/src/index.ts:74

    `- iOS: Run 'pod install' in your ios directory\n` +
    `- Android: Make sure the package is properly included in your MainApplication.java`
  );
}

// Install the JSI bindings
const installed = TursoNative.install();
if (!installed) {
  throw new Error(
    '@tursodatabase/sync-react-native: Failed to install JSI bindings. Make sure the New Architecture is enabled.'
  );
}

// Get the proxy that was installed on the global object
// __TursoProxy is declared globally in types.ts
const TursoProxy: TursoProxyType = __TursoProxy;

if (!TursoProxy) {
  throw new Error(
    '@tursodatabase/sync-react-native: JSI bindings not found on global object. This is a bug.'
  );
}

/**
 * Helper function to construct a database path in a writable directory.
 *
 * @param filename - Database filename (e.g., 'mydb.db')
 * @returns Absolute path to the database file
 *
 * @example
 * ```ts
 * import { getDbPath, connect } from '@tursodatabase/sync-react-native';
 *
 * const dbPath = getDbPath('mydb.db');
 * const db = await connect({ path: dbPath });
 * ```
 */

View on GitHub (pinned to bad083fafb)

Solutions

  1. Disable remote JS debugging (use Hermes/Flipper or on-device debugging) — JSI is not available across the remote debugger bridge
  2. Do a full reload and, if persistent, a full native rebuild
  3. Check for duplicate installs: npm ls @tursodatabase/sync-react-native, dedupe node_modules
  4. If it still reproduces on-device with matched versions, report it upstream with RN version and repro steps

Example fix

// before: 'Debug JS Remotely' enabled in the dev menu
// import throws: JSI bindings not found on global object

// after: open the RN dev menu and disable 'Debug with Chrome'/remote debugging,
// then reload the app; use Flipper or console logs for debugging instead
Defensive patterns

Strategy: try-catch

Try / catch

let sdk: typeof import('@tursodatabase/sync-react-native');
try {
  sdk = require('@tursodatabase/sync-react-native');
} catch (e) {
  if (String((e as Error).message).includes('JSI bindings not found')) {
    // most often remote JS debugging is on — disable it and reload
    throw new Error('Disable remote JS debugging (JSI needs the on-device runtime) and reload');
  }
  throw e;
}

Prevention

When it happens

Trigger: Chrome remote debugging / 'Debug with Chrome' enabled: JS executes in Chrome while __TursoProxy exists only on the device's native runtime; a fast-refresh/reload race leaving the global unset; two copies of the package installed so install() ran against a different native instance.

Common situations: Developers debugging with Chrome DevTools instead of on-device debugging; Metro fast refresh during native module development; yarn/npm hoisting duplicates in monorepos.

Related errors


AI-assisted analysis of tursodatabase/turso@bad083fafb (2026-08-16). Data as JSON: /api/errors/72cd06ad584ac9c1. Report an issue: GitHub.