From 1b0612c73ee22b0fdbd55df9e28c8f53e4a3c96d Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Tue, 1 Dec 2026 01:14:45 -0500 Subject: [PATCH] docs(contributing): explain which Node.js Git hooks use (#15448) nvm use changes Node.js only in the terminal it runs in. Hooks started from an IDE, a Git client or an agent use the default Node.js on PATH, and the pre-push checks fail when that version is outside the engines range. Point contributors in that situation to ~/.config/husky/init.sh, which Husky reads before every hook. --- CONTRIBUTING.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f8697c356a8..815d3b4b029 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -265,7 +265,11 @@ npm run check:fast ``` `npm ci` installs the exact dependencies and prepares the Husky hooks without -building the project. Run `npm run build:cached` when you need the standalone +building the project. Git hooks use the Node.js first on `PATH` where Git +runs, which `nvm use` in one terminal does not change for IDEs, Git clients or +agents. If your default Node.js is outside `package.json#engines`, put the +pinned version first for hooks in `~/.config/husky/init.sh`, for example +`export PATH="$HOME/.nvm/versions/node/v24.22.1/bin:$PATH"`. Run `npm run build:cached` when you need the standalone CLI or MCP server; it compiles the runtime and bundles the authored skill. `npm run build` forces those tasks to rerun. Neither command generates test catalogs, documentation projections, or managed verification evidence. Turbo