{"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/bad083fafbefdeae9a42ec19bdaaad8918dcf411/bindings/react-native/src/index.ts#L46-L82","documentation":"After the native module is found, index.ts calls TursoNative.install() to install the JSI bindings; a false return means the TurboModule exists but JSI installation failed. This package requires React Native's New Architecture (JSI host objects on the global), so the dominant cause is running on the old architecture where install() cannot succeed. Like the module check, this throws at import time.","triggerScenarios":"New Architecture disabled: iOS without RCT_NEW_ARCH_ENABLED (or newArchEnabled=false in android/gradle.properties); an old React Native version that lacks the required JSI/turbo-module support; partial upgrade where only one platform has the new arch enabled.","commonSituations":"Adding this SDK to an older RN app (pre-0.7x) that cannot enable the new arch; toggling newArchEnabled back to false for a compatibility workaround; CI builds using stale gradle.properties.","solutions":["Enable the New Architecture: android/gradle.properties -> newArchEnabled=true, and rebuild; on modern RN (0.76+) it is on by default","Upgrade React Native to a version with mature New Architecture support if the app is old","After flipping the flag, do a full clean rebuild (gradlew clean / pod deintegrate && pod install) — the setting is compiled in","Confirm no other library forces the old architecture in the same build"],"exampleFix":"# android/gradle.properties (before)\nnewArchEnabled=false\n# app crashes at import: Failed to install JSI bindings\n\n# android/gradle.properties (after)\nnewArchEnabled=true\n# then: cd android && ./gradlew clean && cd .. && npx react-native run-android","handlingStrategy":"validation","validationCode":"// Verify build config before relying on the SDK\n// android/gradle.properties must contain newArchEnabled=true\n// iOS: RCT_NEW_ARCH_ENABLED=1 (default in newer RN templates)\n// Add a startup assertion so misconfiguration fails loudly at boot:\nif (!__TursoProxy) {\n  console.error('Turso JSI not installed — check that the New Architecture is enabled');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep newArchEnabled=true in android/gradle.properties and pod install after any flag change","Verify other native dependencies support the New Architecture before enabling it app-wide","Treat 'Failed to install JSI bindings' as a build-config error, not a code bug — fix the build first"],"tags":["react-native","jsi","new-architecture","setup"],"backgroundTag":"jsi-initialization-failed","analyzedSha":"bad083fafbefdeae9a42ec19bdaaad8918dcf411","analyzedAt":"2026-08-16T23:12:11.798Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}