Repository navigation
Closed
Labels
Milestone
Description
Which @angular/* package(s) are the source of the bug?
compiler
Is this a regression?
No
Description
In Angular 19.2 template literals are allowed in template files but when using with @let or track this causes a build error.
There are surely other cases that I have not noticed.
Please provide a link to a minimal reproduction of the bug
Please provide the exception or error you saw
✘ [ERROR] Angular compilation emit failed. [plugin angular-compiler]
Error: Debug Failure. Invalid raw text
at checkTemplateLiteralLikeNode (/home/projects/sb1-uvh8sdq9/node_modules/typescript/lib/typescript.js:26263:22)
at Object.createNoSubstitutionTemplateLiteral (/home/projects/sb1-uvh8sdq9/node_modules/typescript/lib/typescript.js:26318:12)
at TypeScriptAstFactory.createTemplateLiteral (file:///home/projects/sb1-uvh8sdq9/node_modules/@angular/compiler-cli/bundles/chunk-KOIBHR3X.js:3129:53)
at ExpressionTranslatorVisitor.visitTemplateLiteralExpr (file:///home/projects/sb1-uvh8sdq9/node_modules/@angular/compiler-cli/bundles/chunk-KOIBHR3X.js:2500:48)
at TemplateLiteralExpr.visitExpression (file:///home/projects/sb1-uvh8sdq9/node_modules/@angular/compiler/fesm2022/compiler.mjs:1545:24)
at ExpressionTranslatorVisitor.visitExpressionStmt (file:///home/projects/sb1-uvh8sdq9/node_modules/@angular/compiler-cli/bundles/chunk-KOIBHR3X.js:2466:81)
at ExpressionStatement.visitStatement (file:///home/projects/sb1-uvh8sdq9/node_modules/@angular/compiler/fesm2022/compiler.mjs:2180:24)
at eval (file:///home/projects/sb1-uvh8sdq9/node_modules/@angular/compiler-cli/bundles/chunk-KOIBHR3X.js:2635:42)
at ExpressionTranslatorVisitor.visitStatements (file:///home/projects/sb1-uvh8sdq9/node_modules/@angular/compiler-cli/bundles/chunk-KOIBHR3X.js:2635:23)
Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 19.2.4
Node: 18.20.3
Package Manager: npm 10.2.3
OS: linux x64
Angular: 19.2.3
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, router
Package Version
------------------------------------------------------
@angular-devkit/architect 0.1902.4
@angular-devkit/core 19.2.4
@angular-devkit/schematics 19.2.4
@angular/build 19.2.4
@angular/cli 19.2.4
@schematics/angular 19.2.4
rxjs 7.8.1
typescript 5.6.3
zone.js 0.15.0
Anything else?
No response
Reacted by Dave and Julien Marcou
Activity
[-]Compile parsing error when using template literal with `@let` or `track`[/-][+]Compile error when using template literal with `@let` or `track`[/+][-]Compile error when using template literal with `@let` or `track`[/-][+]Build error when using template literal with `@let` or `track`[/+]fix(compiler): error if rawText isn't estimated correctly
fix(compiler): error if rawText isn't estimated correctly (angular#60529
Julien-Marcou commentedon Apr 1, 2025
@crisbeto it looks this will be released in the next major version of angular only, but I'm encountering this error in v19.2.4, will it be backported to angular v19.2.5?
fix(compiler): error if rawText isn't estimated correctly (#60529) (#…
angular-automatic-lock-bot commentedon May 2, 2025
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.