MCPcopy Create free account
hub / github.com/TanStack/ai / npmGlobal

Function npmGlobal

examples/sandbox-web/src/sandbox-agent.ts:103–105  ·  view source on GitHub ↗

* A global npm install with a sudo fallback: some images (Daytona) run as a * non-root user with a root-owned global npm prefix → `-g` fails EACCES; retry * under passwordless sudo, preserving PATH so nvm's npm/node still resolve. Docker * runs as root, so the direct install succeeds and sudo nev

(spec: string)

Source from the content-addressed store, hash-verified

101 * runs as root, so the direct install succeeds and sudo never runs.
102 */
103function npmGlobal(spec: string): string {
104 return `npm install -g ${spec}`
105}
106
107const HARNESSES: Record<HarnessName, HarnessSpec> = {
108 'claude-code': {

Callers 1

sandbox-agent.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected