Skip to content

v0.4.3 — fail clearly on unsupported Node

Choose a tag to compare

@anishmoncivarghese anishmoncivarghese released this 31 Aug 09:13
· 3 commits to main since this release

A patch release worth taking promptly if you are on Node 20.

The bug

Running any real sonde command on Node 20 segfaulted with no output at all — exit 139, no message, no stack trace.

What made it bad is that everything a new user checks first said the install had worked:

  • npm install -g @cheppulabs/sonde printed an EBADENGINE warning among ordinary npm output and exited 0
  • sonde --version printed 0.4.2 normally, because it never opens a database
  • sonde index . then died in silence

The bundled better-sqlite3 requires Node 22. On Node 20 it imports cleanly and only crashes when the database is used, so nothing surfaces the problem until the first command that matters — and then it crashes below the level where a message is possible.

The fix

sonde now refuses to start on Node below 22 and says why:

sonde requires Node 22 or newer, but this is Node 20.20.2.
The bundled better-sqlite3 segfaults on older versions, so sonde stops here
rather than crashing without explanation.
Upgrade Node (for example `nvm install 22`), then reinstall:
`npm install -g @cheppulabs/sonde`.

The guard is deliberately one-directional: a version string it cannot parse is accepted, not rejected. Blocking someone whose Node is fine would be worse than the problem it prevents.

How it was found

By installing the published package to actually use it — not by tests, review, or CI, all of which were green. Node 20 was LTS until recently, so this would have hit a large share of first-time users on their first command.

This is the third bug in a row found by running the published package rather than the repository, after the pyright resolution question in 0.3.0 and the missing-tsconfig.json case in 0.4.1. Verifying a release by clean install is now a documented rule in the project's AGENTS.md.