You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ng g @angular/core:standalone throws when plural syntax is used in template (TextEncoder is not defined) #48940
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: migrationsIssues related to `ng update`/`ng generate` migrationsbugcross-cutting: standaloneIssues related to the NgModule-less worldstate: has PR
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
ng g @angular/core:standalone throws when a template uses the plural syntax
ng new standalone-migration --defaults
cd standalone-migration
ng update @angular/core@next @angular/cli@next --force
ng add @angular/localize
echo "<div>{ 0, plural, =0 {Nobody} }</div>" > src/app/app.component.html
ng g @angular/core:standalone --defaults
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
❯ ng g @angular/core:standalone --defaults
TextEncoder is not defined
Please provide the environment you discovered this bug in (run ng version)
While the CLI PR does avoid the crash, there may be more to this issue.
Since the schematics are not emitting code via the compiler and the TextDecoder instance is lazily initialized, using the AOT compiler for metadata static analysis should probably not be causing an error in this case since there is no need for the digest to be calculated.
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: migrationsIssues related to `ng update`/`ng generate` migrationsbugcross-cutting: standaloneIssues related to the NgModule-less worldstate: has PR
Activity
fix(@angular/cli): error if Angular compiler is used in a schematic
crisbeto commentedon Feb 5, 2023
This is a CLI bug. I've sent out angular/angular-cli#24662 to fix it.
clydin commentedon Feb 6, 2023
While the CLI PR does avoid the crash, there may be more to this issue.
Since the schematics are not emitting code via the compiler and the
TextDecoderinstance is lazily initialized, using the AOT compiler for metadata static analysis should probably not be causing an error in this case since there is no need for the digest to be calculated.fix(@angular/cli): error if Angular compiler is used in a schematic
fix(@angular/cli): error if Angular compiler is used in a schematic
angular-automatic-lock-bot commentedon Mar 10, 2023
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.