{"record":{"id":"dda195f480d0bc91","repo":"emberjs/ember.js","slug":"unexpected-block-params-list-on-name-componen","errorCode":null,"errorMessage":"Unexpected block params list on <${name}> component invocation: when passing named blocks, the invocation tag cannot take block params","messagePattern":"Unexpected block params list on <(.+?)> component invocation: when passing named blocks, the invocation tag cannot take block params","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/@glimmer/syntax/lib/v2/normalize.ts","lineNumber":1014,"sourceCode":"\n    return this.el.simple(name, this.nonBlockChildren, this.loc);\n  }\n\n  assertComponent(\n    name: string,\n    table: BlockSymbolTable,\n    hasBlockParams: boolean\n  ): PresentArray<ASTv2.NamedBlock> {\n    if (isPresentArray(this.namedBlocks) && this.hasSemanticContent) {\n      throw generateSyntaxError(\n        `Unexpected content inside <${name}> component invocation: when using named blocks, the tag cannot contain other content`,\n        this.loc\n      );\n    }\n\n    if (isPresentArray(this.namedBlocks)) {\n      if (hasBlockParams) {\n        throw generateSyntaxError(\n          `Unexpected block params list on <${name}> component invocation: when passing named blocks, the invocation tag cannot take block params`,\n          this.loc\n        );\n      }\n\n      let seenNames = new Set<string>();\n\n      for (let block of this.namedBlocks) {\n        let name = block.name.chars;\n\n        if (seenNames.has(name)) {\n          throw generateSyntaxError(\n            `Component had two named blocks with the same name, \\`<:${name}>\\`. Only one block with a given name may be passed`,\n            this.loc\n          );\n        }\n\n        if (","sourceCodeStart":996,"sourceCodeEnd":1032,"githubUrl":"https://github.com/emberjs/ember.js/blob/26f97246a8bf2e28edf26ac3093da2e86c04ffc5/packages/@glimmer/syntax/lib/v2/normalize.ts#L996-L1032","documentation":"A component invocation cannot both take block params (|a b|) and pass named blocks (<:x>). Block params correspond to the implicit default block; named blocks replace that with explicit per-name blocks, so the combination is ambiguous and rejected.","triggerScenarios":"Compiling <MyComp as |a b|><:header>h</:header></MyComp> — assertComponent sees namedBlocks present and hasBlockParams true, and throws before deduplicating block names.","commonSituations":"Adding named blocks to an existing |params| invocation (e.g. when adopting an {{#each}}-style call into named blocks), or converting {{#my-comp as |x|}} to angle brackets while keeping `as |x|`.","solutions":["Remove `as |...|` from the tag and move that content into a <:default> named block","Remove the named blocks if block params are what you actually need","Split into two components if you need both parameterization and named blocks"],"exampleFix":"// before\n<List as |item|>\n  <:header>Items</:header>\n</List>\n// after\n<List>\n  <:header>Items</:header>\n  <:item as |item|>...</:item>\n</List>","handlingStrategy":"validation","validationCode":"function blockParamsWithNamedBlocks(src) {\n  return /<\\w+[^>]*as\\s+\\|[^|]*\\|[^>]*>[\\s\\S]*<:\\w+>/.test(src);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When migrating `{{#comp as |a|}}` to angle brackets, convert `as |a|` content into a named block with its own `as |a|`","Never mix `as |...|` on the invocation tag with `<:block>` children","Document component APIs: which blocks take params"],"tags":["glimmer","handlebars","named-blocks","block-params","template-syntax"],"backgroundTag":"block-params-with-named-blocks","analyzedSha":"26f97246a8bf2e28edf26ac3093da2e86c04ffc5","analyzedAt":"2026-09-01T05:01:28.182Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}