emberjs/ember.js · error · Error

Attempted to resolve a component in a strict mode template,

Error message

Attempted to resolve a component in a strict mode template, but that value was not in scope: ${meta.symbols.upvars![expr[1]] ?? '{unknown variable}'}

What it means

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.

Source

Thrown at packages/@glimmer/opcode-compiler/lib/opcode-builder/helpers/resolution.ts:96

/**
 * <Foo/>
 * <Foo></Foo>
 * <Foo @arg={{true}} />
 */
export function resolveComponent(
  resolver: Nullable<ClassicResolver>,
  constants: ProgramConstants,
  meta: BlockMetadata,
  [, expr, then]: ResolveComponentOp
): void {
  assert(isGetFreeComponent(expr), 'Attempted to resolve a component with incorrect opcode');

  let type = expr[0];

  if (DEBUG && expr[0] === SexpOpcodes.GetStrictKeyword) {
    assert(!meta.isStrictMode, 'Strict mode errors should already be handled at compile time');

    throw new Error(
      `Attempted to resolve a component in a strict mode template, but that value was not in scope: ${
        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme
        meta.symbols.upvars![expr[1]] ?? '{unknown variable}'
      }`
    );
  }

  if (type === SexpOpcodes.GetLexicalSymbol) {
    let {
      scopeValues,
      owner,
      symbols: { lexical },
    } = meta;
    let definition = expect(scopeValues, 'BUG: scopeValues must exist if template symbol is used')[
      expr[1]
    ];

    then(

View on GitHub (pinned to 26f97246a8)

When it happens

Trigger: Thrown at packages/@glimmer/opcode-compiler/lib/opcode-builder/helpers/resolution.ts:96 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of emberjs/ember.js@26f97246a8 (2026-09-01). Data as JSON: /api/errors/e0d6f9889915abd7. Report an issue: GitHub.