pulumi/pulumi · error
internal error: no expr for path %v
Error message
internal error: no expr for path %v
What it means
In getEnvironmentMember, after locating the member's node under "values", the CLI looks up the corresponding expression via getEnvExpr(esc.Expr{Object: env.Exprs}, path). If no expression is found for a path whose node exists, it returns "internal error: no expr for path %v". This signals an inconsistency between the evaluated properties/expression tree and the definition AST — normally unreachable.
Source
Thrown at pkg/cmd/esc/cli/env_get.go:375
var stacker stackable
valueJSON := ""
if value != nil {
stacker = &stackableValue{v: value}
j, err := json.MarshalIndent(value.ToJSON(!showSecrets), "", " ")
if err != nil {
return nil, fmt.Errorf("encoding value: %w", err)
}
valueJSON = string(j)
}
definitionYAML := ""
if valuesNode, ok := (encoding.YAMLSyntax{Node: &docNode}.Get(resource.PropertyPath{"values"})); ok {
if node, _ := (encoding.YAMLSyntax{Node: valuesNode}.Get(path)); node != nil {
expr, ok := getEnvExpr(esc.Expr{Object: env.Exprs}, path)
if !ok {
return nil, fmt.Errorf("internal error: no expr for path %v", path)
}
stacker = &stackableExpr{x: expr}
d, err := marshalYAML(node)
if err != nil {
return nil, fmt.Errorf("marshaling definition: %w", err)
}
definitionYAML = d
}
}
var stack []string
if stacker != nil {
for stacker.Next() {
rng := stacker.Range()
env := rng.Environment
if env == "<yaml>" {
env = envNameView on GitHub (pinned to 793f7b2e16)
Solutions
- Retry the command — a concurrent update may have caused the mismatch
- Update the pulumi CLI to match your ESC service version
- File a bug with the path and environment definition if it persists
Defensive patterns
Strategy: retry
Validate before calling
// Verify expr tree and node tree are consistent before rendering
expr, ok := getEnvExpr(esc.Expr{Object: env.Exprs}, path)
if !ok {
// path mismatch between definition AST and evaluated exprs: re-check env
return fmt.Errorf("inconsistent state for path %v, re-fetch environment", path)
} Type guard
func hasExprAt(exprs esc.Expr, path resource.PropertyPath) bool {
_, ok := getEnvExpr(exprs, path)
return ok
} Prevention
- Avoid concurrent modifications while reading an environment
- Keep CLI/ESC service versions in sync
- Re-fetch the environment on mismatch instead of proceeding
When it happens
Trigger: Running `pulumi env get <env> <path>` where the YAML node exists under values but the evaluated env.Exprs object has no matching expression entry (e.g. definition changed between evaluation and rendering, or server/client mismatch).
Common situations: Version mismatch between CLI and ESC service; race where the environment was updated mid-command; genuine engine bug.
Related errors
- internal error: rendering: %w
- internal error: creating renderer: %w
- the clone command does not accept versions
- cloning environment: %w
- invalid path: %w
AI-assisted analysis of pulumi/pulumi@793f7b2e16 (2026-08-31).
Data as JSON: /api/errors/09e00cb5cc69f65d.
Report an issue: GitHub.