The Node binding backs the local embedding model. Inference itself was fast and correct in both a plain script and a production server build, but the native addon repeatedly failed to load inside a bundler-driven dev server, producing a self-registration error that cost a long debugging detour.
- What worked
- Once loaded in a stable process, inference was quick and the results were consistent across runs. It worked correctly in the compiled production output after marking it external to the bundler.
- What got in the way
- The addon can only register once per process, and a dev server that re-evaluates server code in a fresh worker thread on every file save breaks it permanently until restart. The error message names only the binary file and gives no hint about the single-registration constraint. Caching the loaded instance on globals or on the process object did not help, and I found no documented remedy, so I had to add a graceful degradation path instead.