-
Notifications
You must be signed in to change notification settings - Fork 2.2k
NemoClaw install fails in Git checkout when hook bootstrap invokes missing 'prek' binary (npm error 127) #731
Description
Description
When deploying/installing NemoClaw from a Git checkout, install fails because the hook bootstrap step runs:
if [ -d .git ]; then prek install --hook-type pre-commit --hook-type commit-msg --hook-type pre-push; fi
On environments where 'prek' is not installed, npm exits with code 127 and deployment stops.
Environment
- Platform: DGX host (Linux)
- Repo: NVIDIA/NemoClaw
- Branch state during run: local main behind origin/main by 6 commits
- Install context: running install/deploy from a directory containing .git
Observed behavior
Install fails with:
- npm error code 127
- npm error command failed
- npm error command sh -c if [ -d .git ]; then prek install --hook-type pre-commit --hook-type commit-msg --hook-type pre-push; fi
- npm error sh: 1: prek: not found
- npm log: /root/.npm/_logs/2026-03-23T18_41_15_596Z-debug-0.log
Expected behavior
Install/deploy should not fail just because dev git hook tooling is unavailable.
Production/deploy install paths should succeed without requiring 'prek'.
Steps to reproduce
- Clone NemoClaw repo on a host where 'prek' is not installed.
- Run NemoClaw deploy/install flow that executes npm install in repo context.
- Ensure .git directory is present.
- Observe npm failure code 127 during hook bootstrap.
Probable root cause
Install script conditionally runs hook bootstrap whenever .git exists, but does not verify 'prek' availability before invoking it.
Suggested fix
- Gate hook installation with binary check, e.g. command -v prek >/dev/null 2>&1.
- Alternatively disable hook bootstrap in non-dev/deploy contexts (CI/packaging/install).
- Log a warning and continue when hook tooling is absent instead of failing install.
Impact
Deployment is blocked in environments that do not include developer hook tooling, even though runtime requirements are otherwise satisfied.
Reproduction Steps
git clone https://github.com/NVIDIA/NemoClaw.git
cd NemoClaw
git checkout main
sudo npm install -g .
Environment
Platform: DGX host (Linux)
Debug Output
time=2026-03-23T11:41:15.684-07:00 level=INFO msg="Remote deploy-nemoclaw output" output="Your branch is behind 'origin/main' by 6 commits, and can be fast-forwarded.\n (use \"git pull\" to update your local branch)\nFrom
https://github.com/NVIDIA/NemoClaw\n c55a309..e98c26e main -> origin/main\n + f5b3d23...afc1e35 feat/nemoclaw-sugar -> origin/feat/nemoclaw-sugar (forced update)\n + cca052e...c6cfccc feat/openai-anthropic-gemi
ni-providers -> origin/feat/openai-anthropic-gemini-providers (forced update)\n a0af4d4..ce4044b fix/curl-bash-integrity -> origin/fix/curl-bash-integrity\n * [new branch] fix/gateway-process-isolation -> origin/fix/gateway-proc
ess-isolation\n * [new branch] fix/openshell-checksum-verify -> origin/fix/openshell-checksum-verify\n * [new branch] fix/telegram-allowed-chats -> origin/fix/telegram-allowed-chats\nAlready on 'main'\nnpm error code 127\nnpm e
rror path /home/devtech2/~/NemoClaw\nnpm error command failed\nnpm error command sh -c if [ -d .git ]; then prek install --hook-type pre-commit --hook-type commit-msg --hook-type pre-push; fi\nnpm error sh: 1: prek: not found\nnpm error A
complete log of this run can be found in: /root/.npm/_logs/2026-03-23T18_41_15_596Z-debug-0.log\n" attempt=1 task=deploy-nemoclawLogs
Checklist
- I confirmed this bug is reproducible
- I searched existing issues and this is not a duplicate