Skip to content

NemoClaw install fails in Git checkout when hook bootstrap invokes missing 'prek' binary (npm error 127) #731

@ahunnargikar-nvidia

Description

@ahunnargikar-nvidia

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

  1. Clone NemoClaw repo on a host where 'prek' is not installed.
  2. Run NemoClaw deploy/install flow that executes npm install in repo context.
  3. Ensure .git directory is present.
  4. 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-nemoclaw

Logs

Checklist

  • I confirmed this bug is reproducible
  • I searched existing issues and this is not a duplicate

Metadata

Metadata

Assignees

No one assigned

    Labels

    Getting StartedUse this label to identify setup, installation, or onboarding issues.bugSomething isn't workingstatus: triageFor new items that haven't been reviewed yet.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions