I checked the vault folder under ~/.config/obsidian-headless/sync now: It only has a config.json file (interestingly with empty device name, even though it shows a device name under ob sync-status), and a completely empty state.db file. No log file.
Also, I tried reading the source code, but it seems to be a minified build output only.
I’m now getting an error with better-sqlite3 saying that it was compiled against a different node.js version:
“using
NODE_MODULE_VERSION 127. This version of Node.js requires
NODE_MODULE_VERSION 137. Please try re-compiling or re-installing…”
have tried various attempts to reinstall it, and a couple of different note versions… could this be related to how ob sync was failing silently before? (If the engine wasn’t loading?)
@WhiteNoise to your question: in 0.0.6 I edited the .config/obsidian-headless/sync/[vault]/config.json and changed the deviceName to my hostname. It was empty, despite me passing –device-name to “ob sync-setup”. Then “ob sync” worked.
I’ve upgraded to 0.0.7 and now i see this error:
$ ob sync
Sync failed: Error: The module '/usr/lib/node_modules/obsidian-headless/node_modules/better-sqlite3/build/Release/better_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 127. This version of Node.js requires
NODE_MODULE_VERSION 141. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at Module._extensions..node (node:internal/modules/cjs/loader:1996:18)
at Module.load (node:internal/modules/cjs/loader:1552:32)
at Module._load (node:internal/modules/cjs/loader:1354:12)
at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
at Module.require (node:internal/modules/cjs/loader:1575:12)
at require (node:internal/modules/helpers:191:16)
at bindings (/usr/lib/node_modules/obsidian-headless/node_modules/bindings/bindings.js:112:48)
at new Database (/usr/lib/node_modules/obsidian-headless/node_modules/better-sqlite3/lib/database.js:48:64)
at new de (/usr/lib/node_modules/obsidian-headless/cli.js:3:13017)
at new Te (/usr/lib/node_modules/obsidian-headless/cli.js:7:13716) {
code: 'ERR_DLOPEN_FAILED'
}
I can make it work using nvm to force node 24:
$nvm exec 24 ob sync Running node v24.14.0 (npm v11.9.0) No sync configuration found for /home/hawat Run 'ob sync-setup' first.