Skip to content

Angular CLI SSR Configuration removes trailing comma in AppConfig, resulting in Syntax Errors #26911

Closed

Description

@JonasDev17

Command

add

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

No response

Description

Upon running ng add @angular/ssr the following happened:

        provideHotToastConfig({
            position: "bottom-right",
        })provideClientHydration(),
        

provideClientHydration was not placed on a new line and the trailing comma was removed, resulting in a syntax error.

image

Minimal Reproduction

run:

ng add @angular/ssr

Exception or Error

Syntax Error

Your Environment

Angular CLI: 17.1.0
Node: 18.14.2
Package Manager: pnpm 8.6.11
OS: win32 x64

Angular: 17.1.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, material-luxon-adapter, platform-browser
... platform-browser-dynamic, platform-server, router, ssr

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1700.3
@angular-devkit/build-angular   17.1.0
@angular-devkit/core            17.0.3
@angular-devkit/schematics      17.0.3
@schematics/angular             17.1.0
rxjs                            7.8.0
typescript                      5.3.3
zone.js                         0.14.3

Anything else relevant?

No response

Activity

  1. changed the title [-]Angular CLI SSR Configuration Fails to Consider Trailing Comma in AppConfig, Resulting in Syntax Errors[/-] [+]Angular CLI SSR Configuration removes trailing comma in AppConfig, resulting in Syntax Errors[/+] on Jan 22, 2024
  2. added
    freq1: low
    on Jan 22, 2024
  3. added 3 commits that reference this issue on Jan 23, 2024
    90c53cc
    2640b2e
    e07b5d5
  4. self-assigned this
    on Jan 23, 2024
  5. added 2 commits that reference this issue on Jan 23, 2024
    90363dd
    35ebf1e
  6. angular-automatic-lock-bot commented on Feb 25, 2024

    @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 Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: @schematics/angularfreq1: lowseverity3: brokentype: bug/fix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions