fix: surfaces outdated node version error [LSDK-343] - #28
Merged
Conversation
David Duong (dqbd)
previously approved these changes
Jul 16, 2026
Bump version and rebuild bundle. Ships the Node version guard that surfaces outdated-node errors instead of failing silently. Also realigns .cursor-plugin/plugin.json (was 0.3.0) with package.json. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Cursor launches hooks from a GUI context, so the
nodeit runs is not your shell's version-managed node (nvm/mise/asdf) — it's whatever is on the systemPATH, often an old node or none. The hooks importnode:sqlite, which needs Node ≥ 22.13. On older node that import throws at module-load before any of our code runs, so tracing fails silently: no log line, no trace,turn_countstuck at 0.Fix
Route every hook through a small version guard (
node ./bundle/guard.js <hook-name>) that:process.versions.nodefirst, andIf node is too old, it writes a clear message to stderr +
~/.cursor/langsmith-hook.log(including the exact node binary Cursor used) and exits 0, so failures are loud instead of silent — no scary per-turn hook error.Changes: new
src/utils/node-version.ts(+ unit tests) andsrc/hooks/guard.ts; bothhooks.jsonfiles repointed through the guard; esbuild bundlesguard.js; README troubleshooting section added.Notes
PATH. Users need Node ≥ 22.13 on the systemPATH, or to launch Cursor from a terminal. A version-manager-aware launcher (issue Marketplace hooks fail under nvm #27) is the follow-up that would actually fix both cases.