Help for Realm® apps / Build errors
Realm postinstall: ENOENT on realm-core/dependencies.yml in submit-analytics
During install, realm's analytics script reads a file that is not in the npm package. Setting REALM_DISABLE_ANALYTICS=1 does not stop it.
Updated 9 November 2026.
The error
With Yarn and realm 20.2.0 (#7048, paths shortened):
realm@npm:20.2.0 [9cf62] STDERR Error: ENOENT: no such file or directory, open '/…/node_modules/realm/bindgen/vendor/realm-core/dependencies.yml'
realm@npm:20.2.0 [9cf62] STDERR at getRealmCoreVersion (/…/node_modules/realm/dist/scripts/submit-analytics.js:136:10)
realm@npm:20.2.0 [9cf62] STDERR at collectPlatformData (/…/node_modules/realm/dist/scripts/submit-analytics.js:184:30)
realm@npm:20.2.0 [9cf62] STDERR at submitAnalytics (/…/node_modules/realm/dist/scripts/submit-analytics.js:295:24)
With pnpm and realm 12.15.0 (#7126):
.../node_modules/realm postinstall$ node ./scripts/submit-analytics.js
.../node_modules/realm postinstall: Error: ENOENT: no such file or directory, open '/…/node_modules/.pnpm/realm@12.15.0_…/node_modules/realm/bindgen/vendor/realm-core/dependencies.yml'
When it happens
- On install of realm 12.x and 20.x, when install scripts run. pnpm and Yarn show the error. npm hides the output of install scripts that succeed, so with npm you may not see it.
- In #7126 (May 2026), the author reports that their deployment fails at this step.
Why
realm's postinstall runs submit-analytics.js, which collects data about your build before sending it. It first reads bindgen/vendor/realm-core/dependencies.yml, which is not in the npm package. Only after that does it check whether analytics are turned off.
In the realm 20.2.0 source, the script catches the error and prints it, so the install goes on. The author of #7126 still reports a failed deployment.
Fix with afterdb
afterdb removes the postinstall script and the analytics.
In package.json, point the two Realm packages to afterdb:
"realm": "npm:@pomwik/afterdb@20.3.0",
"@realm/react": "npm:@pomwik/afterdb-react@0.20.1"
Then reinstall, run pod install on iOS, and rebuild. For Expo dev builds, run npx expo prebuild --clean. Your code keeps import Realm from "realm". If you do not use @realm/react, the first line is enough.
afterdb is an independent open-source fork of the realm-js SDK v20 (Apache-2.0) that we maintain, for apps on realm 20.x without Device Sync. It is not an official Realm release. Code on GitHub, package on npm.
afterdb is realm v20. If you are on realm 12, like the author of #7126, you first need to move to v20, which removed Device Sync. We have not tested a move from v12 to v20.
Without afterdb
REALM_DISABLE_ANALYTICS=1: in #7048, one user reported the error went away and another said it did not. In the 20.2.0 code the file is read before the variable is checked, so we would not count on it.- Pull request #7127 moves the check to the start of the script. As of 9 November 2026, it has no review and is not merged. You can apply the same change with patch-package. We have not tested it.
- Installing with
--ignore-scriptsavoids it, but skips the install scripts of every package. We have not tested it.
Need help? Send your versions and the full error for a free 15-minute check. We reply within 12 hours.