{"record":{"id":"3ecb80095f52c45e","repo":"emberjs/ember.js","slug":"attempted-to-resolve-a-modifier-in-a-strict-mode-t","errorCode":null,"errorMessage":"Attempted to resolve a modifier in a strict mode template, but it was not in scope: ${name}","messagePattern":"Attempted to resolve a modifier in a strict mode template, but it was not in scope: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@glimmer/opcode-compiler/lib/opcode-builder/helpers/resolution.ts","lineNumber":226,"sourceCode":"      scopeValues,\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(constants.modifier(definition as object, lexical?.at(expr[1]) ?? undefined));\n  } else if (type === SexpOpcodes.GetStrictKeyword) {\n    let {\n      symbols: { upvars },\n    } = assertResolverInvariants(meta);\n    let name = unwrap(upvars[expr[1]]);\n    let modifier = resolver?.lookupBuiltInModifier?.(name) ?? null;\n\n    if (DEBUG && modifier === null) {\n      assert(!meta.isStrictMode, 'Strict mode errors should already be handled at compile time');\n\n      throw new Error(\n        `Attempted to resolve a modifier in a strict mode template, but it was not in scope: ${name}`\n      );\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    then(constants.modifier(modifier!, name));\n  } else {\n    let {\n      symbols: { upvars },\n      owner,\n    } = assertResolverInvariants(meta);\n    let name = unwrap(upvars[expr[1]]);\n    let modifier = resolver?.lookupModifier?.(name, owner) ?? null;\n\n    if (DEBUG && modifier === null) {\n      assert(!meta.isStrictMode, 'Strict mode errors should already be handled at compile time');\n\n      throw new Error(","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/emberjs/ember.js/blob/26f97246a8bf2e28edf26ac3093da2e86c04ffc5/packages/@glimmer/opcode-compiler/lib/opcode-builder/helpers/resolution.ts#L208-L244","documentation":"Error \"Attempted to resolve a modifier in a strict mode template, but it was not in scope: ${name}\" thrown in emberjs/ember.js.","triggerScenarios":"Thrown at packages/@glimmer/opcode-compiler/lib/opcode-builder/helpers/resolution.ts:226 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"}