Skip to content

ng add @angular/ssr not working anymore after upgrade to v20 #30526

Closed

Description

@alcfeoh

Which @angular/* package(s) are the source of the bug?

upgrade, Don't known / other

Is this a regression?

Yes

Description

I upgraded this project to v20 to demo SSR for a public talk: https://github.com/alcfeoh/ngx-training/tree/ssr-workshop

And after running ng add @angular/ssr, the project doesn't compile anymore, and ng serve throws an error.

Please provide a link to a minimal reproduction of the bug

https://github.com/alcfeoh/ngx-training/tree/ssr-upgrade-error

Please provide the exception or error you saw

ng serve
Application bundle generation failed. [1.638 seconds]

✘ [ERROR] File 'src/main.server.ts' is missing from the TypeScript compilation. [plugin angular-compiler]

    angular:main-server:angular:main-server:8:24:
      8 │ export { default } from './src/main.server';

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 20.0.2
Node: 22.16.0
Package Manager: npm 10.9.2
OS: darwin arm64

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

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.2000.2
@angular-devkit/core         18.2.7
@angular-devkit/schematics   20.0.2
@angular/build               20.0.2
@angular/cli                 20.0.2
@angular/ssr                 20.0.2
@schematics/angular          20.0.2
rxjs                         7.8.2
typescript                   5.8.3
zone.js                      0.15.1

Anything else?

No response

Activity

  1. alcfeoh commented on Jun 11, 2025

    @alcfeoh
    Author

    Image

  2. transferred this issue fromangular/angularon Jun 11, 2025
  3. added theissue type on Jun 12, 2025
  4. added 2 commits that reference this issue on Jun 12, 2025
    361f77c
    779eac4
  5. added 2 commits that reference this issue on Jun 12, 2025
    c437111
    e90a808
  6. angular-automatic-lock-bot commented on Jul 13, 2025

    @angular-automatic-lock-bot

    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.

  7. locked and limited conversation to collaborators on Jul 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions