emberjs/ember.js · error
Invalid block parameters syntax: incomplete parameters list,
Error message
Invalid block parameters syntax: incomplete parameters list, expecting "|" but the tag was closed prematurely
What it means
After at least one block param identifier was parsed, the parser expected the closing `|`, but instead hit `>` or `/` (tag close). This means the parameters list was left unclosed before the tag ended.
Source
Thrown at packages/@glimmer/syntax/lib/parser/tokenizer-event-handlers.ts:430
throw generateSyntaxError(
`Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list`,
as.start.until(loc)
);
},
};
} else if (next === '|') {
if (element.params.length === 0) {
// Following Handlebars and treat empty block params a syntax error
throw generateSyntaxError(
`Invalid block parameters syntax: empty parameters list, expecting at least one identifier`,
as.start.until(this.offset().move(1))
);
} else {
state = { state: 'AfterEndPipe' };
this.tokenizer.consume();
}
} else if (next === '>' || next === '/') {
throw generateSyntaxError(
`Invalid block parameters syntax: incomplete parameters list, expecting "|" but the tag was closed prematurely`,
as.start.until(this.offset().move(1))
);
} else {
// slurp up anything else into the name, validate later
state = {
state: 'BlockParamName',
name: next,
start: this.offset(),
};
this.tokenizer.consume();
}
},
BlockParamName: (next: string) => {
assert(state.state === 'BlockParamName', 'bug in block params parser');
if (next === '') {View on GitHub (pinned to 26f97246a8)
Solutions
- Add the closing pipe before the tag close: `<Foo as |a|>`
- Check each opened `|` has a matching closing `|`
Example fix
// before <Foo as |a> // after <Foo as |a|>
Defensive patterns
Strategy: validation
Validate before calling
// Each `as |` must have a matching closing `|` before `>` or `/`
if (/<[^>]*\bas\s\|[^|>]*[>\/]/.test(template)) {
throw new Error('Block params list missing closing "|" before tag close');
} Prevention
- Always pair the opening pipe with a closing pipe before `>`
- Use prettier/glimmer formatting to normalize block params
When it happens
Trigger: parsePossibleBlockParams (via appendToAttributeName) when the next character is `>` or `/` while state is inside the parameters list — e.g. `<Foo as |a>` or `<Foo as |a/>`.
Common situations: Forgetting the closing pipe when writing `as |a`; deleting the second pipe during edits; mistaking the tag close for the list terminator.
Related errors
- Invalid block parameters syntax: block parameters must be pr
- Invalid block parameters syntax: expecting at least one spac
- Invalid block parameters syntax: mustaches cannot be used in
- Invalid block parameters syntax: expecting the tag to be clo
- Invalid block parameters syntax: empty parameters list, expe
AI-assisted analysis of emberjs/ember.js@26f97246a8 (2026-09-01).
Data as JSON: /api/errors/fd4f5ae99a0ddcc1.
Report an issue: GitHub.