{"record":{"id":"09e00cb5cc69f65d","repo":"pulumi/pulumi","slug":"internal-error-no-expr-for-path-v","errorCode":null,"errorMessage":"internal error: no expr for path %v","messagePattern":"internal error: no expr for path (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/cmd/esc/cli/env_get.go","lineNumber":375,"sourceCode":"\tvar stacker stackable\n\n\tvalueJSON := \"\"\n\tif value != nil {\n\t\tstacker = &stackableValue{v: value}\n\n\t\tj, err := json.MarshalIndent(value.ToJSON(!showSecrets), \"\", \"  \")\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"encoding value: %w\", err)\n\t\t}\n\t\tvalueJSON = string(j)\n\t}\n\n\tdefinitionYAML := \"\"\n\tif valuesNode, ok := (encoding.YAMLSyntax{Node: &docNode}.Get(resource.PropertyPath{\"values\"})); ok {\n\t\tif node, _ := (encoding.YAMLSyntax{Node: valuesNode}.Get(path)); node != nil {\n\t\t\texpr, ok := getEnvExpr(esc.Expr{Object: env.Exprs}, path)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"internal error: no expr for path %v\", path)\n\t\t\t}\n\t\t\tstacker = &stackableExpr{x: expr}\n\n\t\t\td, err := marshalYAML(node)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"marshaling definition: %w\", err)\n\t\t\t}\n\t\t\tdefinitionYAML = d\n\t\t}\n\t}\n\n\tvar stack []string\n\tif stacker != nil {\n\t\tfor stacker.Next() {\n\t\t\trng := stacker.Range()\n\t\t\tenv := rng.Environment\n\t\t\tif env == \"<yaml>\" {\n\t\t\t\tenv = envName","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/pkg/cmd/esc/cli/env_get.go#L357-L393","documentation":"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.","triggerScenarios":"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).","commonSituations":"Version mismatch between CLI and ESC service; race where the environment was updated mid-command; genuine engine bug.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Verify expr tree and node tree are consistent before rendering\nexpr, ok := getEnvExpr(esc.Expr{Object: env.Exprs}, path)\nif !ok {\n    // path mismatch between definition AST and evaluated exprs: re-check env\n    return fmt.Errorf(\"inconsistent state for path %v, re-fetch environment\", path)\n}","typeGuard":"func hasExprAt(exprs esc.Expr, path resource.PropertyPath) bool {\n    _, ok := getEnvExpr(exprs, path)\n    return ok\n}","tryCatchPattern":null,"preventionTips":["Avoid concurrent modifications while reading an environment","Keep CLI/ESC service versions in sync","Re-fetch the environment on mismatch instead of proceeding"],"tags":["internal-error","cli","esc","consistency"],"backgroundTag":"internal-state-inconsistency","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-09-01T08:17:40.651Z"}