{"record":{"id":"5147045cab99ac89","repo":"tursodatabase/turso","slug":"tursodatabase-sync-react-native-failed-to-instal","errorCode":null,"errorMessage":"@tursodatabase/sync-react-native: Failed to install JSI bindings. Make sure the New Architecture is enabled.","messagePattern":"@tursodatabase/sync-react-native: Failed to install JSI bindings\\. Make sure the New Architecture is enabled\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"bindings/react-native/src/index.ts","lineNumber":64,"sourceCode":"// Export file system configuration function\nexport { setFileSystemImpl } from './internal/ioProcessor';\n\n// Get the native module\nconst TursoNative: TursoNativeModule | undefined = NativeModules.Turso;\n\n// Check if native module is available\nif (!TursoNative) {\n  throw new Error(\n    `@tursodatabase/sync-react-native: Native module not found. Make sure you have properly linked the library.\\n` +\n    `- iOS: Run 'pod install' in your ios directory\\n` +\n    `- Android: Make sure the package is properly included in your MainApplication.java`\n  );\n}\n\n// Install the JSI bindings\nconst installed = TursoNative.install();\nif (!installed) {\n  throw new Error(\n    '@tursodatabase/sync-react-native: Failed to install JSI bindings. Make sure the New Architecture is enabled.'\n  );\n}\n\n// Get the proxy that was installed on the global object\n// __TursoProxy is declared globally in types.ts\nconst TursoProxy: TursoProxyType = __TursoProxy;\n\nif (!TursoProxy) {\n  throw new Error(\n    '@tursodatabase/sync-react-native: JSI bindings not found on global object. This is a bug.'\n  );\n}\n\n/**\n * Helper function to construct a database path in a writable directory.\n *\n * @param filename - Database filename (e.g., 'mydb.db')","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/tursodatabase/turso/blob/244cde92a7df7f9b8b8b7a4075c35a12977e303e/bindings/react-native/src/index.ts#L46-L82","documentation":"The native module exists, but TursoNative.install() returned false, meaning the JSI bindings could not be installed into the JavaScript runtime. This SDK passes all database calls through JSI, which on React Native requires the New Architecture; on the legacy architecture (or a JS runtime where JSI is unavailable, such as remote Chrome debugging) install() fails and the module-init code throws at import time.","triggerScenarios":"Running the app with the New Architecture disabled (newArchEnabled=false on Android, or RCT_NEW_ARCH_ENABLED unset on iOS), an RN version too old for TurboModules (< 0.68), or having Chrome remote JS debugging active - that moves JS execution out of the RN runtime where __TursoProxy cannot be installed.","commonSituations":"Adding the SDK to an older RN app that has not migrated to the New Architecture; a developer enabling 'Debug with Chrome' (remote debugging) which disables JSI even on a new-arch app; CI build flavors that default newArchEnabled back to false after an RN upgrade.","solutions":["Enable the New Architecture: Android - set newArchEnabled=true in android/gradle.properties; iOS - set RCT_NEW_ARCH_ENABLED=1 (or :rn_new_architecture_enabled => true in the Podfile) and re-run pod install","Upgrade React Native to a version that supports the New Architecture (>= 0.68, current recommended line)","Turn off remote JS debugging (use Hermes/Flipper-based debugging instead) - remote debugging executes JS in Chrome where JSI proxies cannot live","Do a full rebuild and reinstall of the app after flipping the flag; a reload will not pick it up"],"exampleFix":"# android/gradle.properties - before\nnewArchEnabled=false\n\n# after\nnewArchEnabled=true\n\n# then: cd android && ./gradlew clean && cd ios && pod install (with RCT_NEW_ARCH_ENABLED=1), full rebuild","handlingStrategy":"validation","validationCode":"// Fail with a clear message before importing, instead of the raw JSI error\nimport { NativeModules, Platform } from 'react-native';\nconst isNewArch = (global as any).RN$Bridgeless ?? false; // proxy for new-arch runtime\nif ((Platform.OS === 'ios' || Platform.OS === 'android') && !isNewArch && __DEV__) {\n  console.warn('Turso RN SDK needs the New Architecture - set newArchEnabled=true / RCT_NEW_ARCH_ENABLED=1');\n}","typeGuard":null,"tryCatchPattern":"try { await import('@tursodatabase/sync-react-native'); } catch (e) { if (String(e.message).includes('Failed to install JSI bindings')) { throw new Error('Enable the RN New Architecture (newArchEnabled=true / RCT_NEW_ARCH_ENABLED=1) and rebuild, or disable remote JS debugging'); } throw e; }","preventionTips":["Enable the New Architecture in android/gradle.properties and the iOS Podfile before adding this SDK","Never use Chrome remote JS debugging with JSI-based libraries - use Hermes/Flipper debugging","After RN upgrades, re-check that newArchEnabled did not reset to false"],"tags":["react-native","jsi","new-architecture","turbo-modules","setup","import-time"],"backgroundTag":"jsi-install-failed","analyzedSha":"244cde92a7df7f9b8b8b7a4075c35a12977e303e","analyzedAt":"2026-08-20T07:02:18.389Z","contentChangedAt":"2026-08-20T07:02:18.389Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}