Skip to content

@tloncorp/api git dependency fails to build on npm install (exit code 127) #2362

@alexey-pelykh

Description

@alexey-pelykh

Description

The @tloncorp/api package is declared as a git dependency (github:tloncorp/api-beta#7eede1c) in both extensions/tlon/package.json and root package.json. When installed via npm (as opposed to pnpm with an existing lockfile), the prepare lifecycle script (npm run buildvite build) fails with exit code 127 because vite — a devDependency of the package — is not available in the git-cloned temp directory.

This affects consumers installing RemoteClaw via npm and host environments running npm install.

Environment

Detail Value
Host macOS (darwin, arm64)
Node.js v25.9.0
npm 11.12.1
RemoteClaw main @ 3a84842
Last upstream sync v2026.3.8 (fc2cefeeab)

Steps to Reproduce

  1. On a clean environment, run npm install (or npm install --force) for a package that depends on RemoteClaw
  2. npm resolves @tloncorp/api@0.0.2 from github:tloncorp/api-beta#7eede1c
  3. npm clones the repo to a temp directory and runs preparenpm run build
  4. vite build fails with exit code 127 ("command not found") — vite is a devDependency that isn't installed in the temp clone

Expected Behavior

npm install completes successfully.

Actual Behavior

error code 127
error path /Users/.../.npm/_cacache/tmp/git-cloneGmmK7w
error command failed
error command sh -c npm run build

Root Cause

@tloncorp/api is a git dependency with a prepare script that invokes vite build. When npm installs git dependencies, it clones the repo and runs prepare, but vite (a devDependency) may not be available in the spawned shell environment.

Upstream Status

Upstream OpenClaw fixed this in commit ac850e815b ("fix(ci): replace tlon git api dependency") by:

  • Removing the @tloncorp/api git dependency entirely
  • Replacing it with @aws-sdk/client-s3 + @aws-sdk/s3-request-presigner
  • Adding a local tlon-api.ts implementation

First upstream release with the fix: v2026.3.22
Our last sync: v2026.3.8 (6 tags behind)

Workaround

Install vite globally on the host: npm install -g vite

Resolution

Either:

  1. Cherry-pick upstream fix ac850e815b ahead of the next sync
  2. Sync upstream to v2026.3.22+ to pick up the fix naturally

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions