{"record":{"id":"e0d6f9889915abd7","repo":"emberjs/ember.js","slug":"attempted-to-resolve-a-component-in-a-strict-mode","errorCode":null,"errorMessage":"Attempted to resolve a component in a strict mode template, but that value was not in scope: ${meta.symbols.upvars![expr[1]] ?? '{unknown variable}'}","messagePattern":"Attempted to resolve a component in a strict mode template, but that value was not in scope: (.+?)'\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@glimmer/opcode-compiler/lib/opcode-builder/helpers/resolution.ts","lineNumber":96,"sourceCode":"/**\n * <Foo/>\n * <Foo></Foo>\n * <Foo @arg={{true}} />\n */\nexport function resolveComponent(\n  resolver: Nullable<ClassicResolver>,\n  constants: ProgramConstants,\n  meta: BlockMetadata,\n  [, expr, then]: ResolveComponentOp\n): void {\n  assert(isGetFreeComponent(expr), 'Attempted to resolve a component with incorrect opcode');\n\n  let type = expr[0];\n\n  if (DEBUG && expr[0] === SexpOpcodes.GetStrictKeyword) {\n    assert(!meta.isStrictMode, 'Strict mode errors should already be handled at compile time');\n\n    throw new Error(\n      `Attempted to resolve a component in a strict mode template, but that value was not in scope: ${\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n        meta.symbols.upvars![expr[1]] ?? '{unknown variable}'\n      }`\n    );\n  }\n\n  if (type === SexpOpcodes.GetLexicalSymbol) {\n    let {\n      scopeValues,\n      owner,\n      symbols: { lexical },\n    } = meta;\n    let definition = expect(scopeValues, 'BUG: scopeValues must exist if template symbol is used')[\n      expr[1]\n    ];\n\n    then(","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/emberjs/ember.js/blob/26f97246a8bf2e28edf26ac3093da2e86c04ffc5/packages/@glimmer/opcode-compiler/lib/opcode-builder/helpers/resolution.ts#L78-L114","documentation":"Error \"Attempted to resolve a component in a strict mode template, but that value was not in scope: ${meta.symbols.upvars![expr[1]] ?? '{unknown variable}'}\" thrown in emberjs/ember.js.","triggerScenarios":"Thrown at packages/@glimmer/opcode-compiler/lib/opcode-builder/helpers/resolution.ts:96 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"26f97246a8bf2e28edf26ac3093da2e86c04ffc5","analyzedAt":"2026-09-01T05:01:28.182Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}