Skip to content

ng extract-i18n throwing error in freshly generated Angular 19 SSR project #28721

@json-derulo

Description

@json-derulo

Command

extract-i18n

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

18.2.9

Description

In a freshly generated Angular 19 project, after adding @angular/localize, the ng extract-i18n command results in an error. In a freshly generated project without SSR, the command works fine.

Minimal Reproduction

  1. Generate a new Angular 19 SSR project npx @angular/cli@next new ng19-i18n --ssr
  2. Add the Angular localize package npx @angular/cli@next add @angular/localize
  3. Run npx @angular/cli@next extract-i18n

Exception or Error

[error] Error: The "server" option is required when "outputMode" is set to "server".
    at normalizeOptions (/projects/ng19-i18n/node_modules/@angular/build/src/builders/application/options.js:109:19)
    at async buildApplicationInternal (/projects/ng19-i18n/node_modules/@angular/build/src/builders/application/index.js:46:31)
    at async first (/projects/ng19-i18n/node_modules/@angular-devkit/build-angular/src/builders/extract-i18n/application-extraction.js:131:22)
    at async extractMessages (/projects/ng19-i18n/node_modules/@angular-devkit/build-angular/src/builders/extract-i18n/application-extraction.js:38:27)
    at async execute (/projects/ng19-i18n/node_modules/@angular-devkit/build-angular/src/builders/extract-i18n/builder.js:83:28)

Your Environment

Angular CLI: 19.0.0-next.13
Node: 20.18.0
Package Manager: npm 10.9.0
OS: darwin x64

Angular: 19.0.0-next.11
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package Version

@angular-devkit/architect 0.1900.0-next.13
@angular-devkit/build-angular 19.0.0-next.13
@angular-devkit/core 19.0.0-next.13
@angular-devkit/schematics 19.0.0-next.13
@angular/cli 19.0.0-next.13
@angular/ssr 19.0.0-next.13
@schematics/angular 19.0.0-next.13
rxjs 7.8.1
typescript 5.6.3
zone.js 0.15.0

Anything else relevant?

No response

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions