Pulumi "Running program ... failed" language runtime error in CI
Pulumi ran your program with the language runtime and it raised an unhandled exception before finishing. The wrapper line is generic; the real error is the traceback printed just above it.
What this error means
A pulumi up or pulumi preview step ends with "error: Running program '/path' failed with an unhandled exception:" followed by a language-specific stack trace.
error: Running program '/home/runner/work/app/app' failed with an unhandled exception:
<ref *1> TypeError: Cannot read properties of undefined (reading 'id')
at /home/runner/work/app/app/index.ts:14:31Common causes
A bug or unset config in the program
The program dereferenced something undefined, read a missing config value, or threw for another reason during resource registration.
Missing dependencies masked as a runtime error
A dependency was not installed, so an import or require inside the program throws at load time.
How to fix it
Read the traceback above the wrapper line
- Scroll up to the first exception line and file:line reference.
- Fix the code path or supply the missing config value.
- Install dependencies first if the error is an import failure.
Supply required config for the stack
If the program reads config that is unset in CI, set it (secret if sensitive) so the program does not throw.
pulumi config set app:apiUrl https://api.example.comHow to prevent it
- Install dependencies before Pulumi so imports resolve.
- Provide all required stack config values in CI.
- Validate config early in the program with clear error messages.