emberjs/ember.js · error · SyntaxError
Unclosed element `${poppedNode.tag}`
Error message
Unclosed element `${poppedNode.tag}` What it means
Error "Unclosed element `${poppedNode.tag}`" thrown in emberjs/ember.js.
Source
Thrown at packages/@glimmer/syntax/lib/parser/handlebars-node-visitors.ts:106
return node;
}
let poppedNode;
try {
this.elementStack.push(node);
for (let child of program.body) {
this.acceptNode(child);
}
} finally {
poppedNode = this.elementStack.pop();
}
// Ensure that that the element stack is balanced properly.
if (node !== poppedNode) {
if (poppedNode?.type === 'ElementNode') {
throw generateSyntaxError(`Unclosed element \`${poppedNode.tag}\``, poppedNode.loc);
} else {
// If the stack is not balanced, then it is likely our own bug, because
// any unclosed Handlebars blocks should already been caught by now
assert(poppedNode !== undefined, '[BUG] empty parser elementStack');
assert(false, `[BUG] mismatched parser elementStack node: ${node.type}`);
}
}
return node;
}
BlockStatement(block: HBS.UpstreamBlockStatement): ASTv1.BlockStatement | void {
if (this.tokenizer.state === 'comment') {
assert(block.loc, '[BUG] BlockStatement in parser unexpectedly did not have loc');
this.appendToCommentData(this.sourceForNode(block as HBS.Node));
return;
}
View on GitHub (pinned to 26f97246a8)
When it happens
Trigger: Thrown at packages/@glimmer/syntax/lib/parser/handlebars-node-visitors.ts:106 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/36e50f2658f35889.
Report an issue: GitHub.