{"record":{"id":"cfdacd0f682da175","repo":"pulumi/pulumi","slug":"problem-executing-program-could-not-run-language","errorCode":null,"errorMessage":"Problem executing program (could not run language executor): %w","messagePattern":"Problem executing program \\(could not run language executor\\): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"sdk/nodejs/cmd/pulumi-language-nodejs/main.go","lineNumber":1071,"sourceCode":"\t\t\tcase 0:\n\t\t\t\t// This really shouldn't happen, but if it does, we don't want to render \"non-zero exit code\"\n\t\t\t\terr = fmt.Errorf(\"Program exited unexpectedly: %w\", exiterr)\n\t\t\tcase nodeJSProcessExitedAfterShowingUserActionableMessage:\n\t\t\t\t// Check if we got special exit code that means \"we already gave the user an\n\t\t\t\t// actionable message\". In that case, we can simply bail out and terminate `pulumi`\n\t\t\t\t// without showing any more messages.\n\t\t\t\treturn &pulumirpc.RunResponse{Error: \"\", Bail: true}\n\t\t\tdefault:\n\t\t\t\terr = fmt.Errorf(\"Program exited with non-zero exit code: %d\", code)\n\t\t\t\tsniffer.Wait()\n\t\t\t\tif sniffer.Detected() {\n\t\t\t\t\terr = fmt.Errorf(\"Program exited with non-zero exit code: %d. %s\", code, sniffer.Message())\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// Otherwise, we didn't even get to run the program.  This ought to never happen unless there's\n\t\t\t// a bug or system condition that prevented us from running the language exec.  Issue a scarier error.\n\t\t\terr = fmt.Errorf(\"Problem executing program (could not run language executor): %w\", err)\n\t\t}\n\n\t\terrResult = err.Error()\n\t}\n\n\t// notify our caller of the response we got from the nodejs process.  Note: this is done\n\t// unilaterally. this is how we signal to nodeLanguageHost.Run that we are done and it can\n\t// return to its caller.\n\treturn &pulumirpc.RunResponse{Error: errResult}\n}\n\n// constructArguments constructs a command-line for `pulumi-language-nodejs`\n// by enumerating all of the optional and non-optional arguments present\n// in a RunRequest.\nfunc (host *nodeLanguageHost) constructArguments(\n\treq *pulumirpc.RunRequest, runPath, address, pipesDirectory string,\n) []string {\n\targs := []string{runPath}","sourceCodeStart":1053,"sourceCodeEnd":1089,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/sdk/nodejs/cmd/pulumi-language-nodejs/main.go#L1053-L1089","documentation":"The language host could not even start the NodeJS/bun process: the error from cmd.Start()/run() was not an *exec.ExitError, meaning exec failed before the program ran. The host wraps the underlying OS error (typically 'executable file not found in $PATH') with this message.","triggerScenarios":"cmd.Start() fails because runtimeBin (node/bun) does not exist or is not executable in PATH, working directory is missing, or exec setup fails (sdk/nodejs/cmd/pulumi-language-nodejs/main.go:1068-1071).","commonSituations":"Runtime set to 'node' but node not installed in the CLI's PATH; `options.runtime: 'bun'` in Pulumi.yaml without bun installed; custom runtime binary name typo; broken PATH under sudo or CI images.","solutions":["Install the required runtime (node or bun) and make sure it is on PATH: `node -v` / `bun -v` should succeed in your shell.","Fix the `runtime` field in Pulumi.yaml (options.runtime) to a valid installed binary name.","If using a custom runtime binary, ensure it is executable (chmod +x) and reachable.","In CI, add the runtime to the job's PATH before invoking pulumi."],"exampleFix":"// before (Pulumi.yaml)\noptions:\n  runtime: bun   # bun not installed\n\n// after: install bun or switch runtime\ncurl -fsSL https://bun.sh/install | bash\n# or\noptions:\n  runtime: nodejs","handlingStrategy":"validation","validationCode":"# Verify the runtime is installed and on PATH before pulumi up\nruntime=$(yq '.options.runtime // \"nodejs\"' Pulumi.yaml)\ncommand -v \"$runtime\" >/dev/null || { echo \"$runtime not found in PATH\"; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install node/bun in every environment (CI images, shells, sudo) where pulumi runs.","Keep `runtime` in Pulumi.yaml matching an installed binary.","Verify PATH in CI before invoking pulumi."],"tags":["nodejs","process-spawn","path","runtime"],"backgroundTag":"executable-not-found-in-path","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-09-01T08:17:40.651Z"}