Skip to content

Angular v20.3 breaks Application Insights with Uncaught TypeError: Cannot redefine property: name #31198

Closed

Description

@MSNev

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

Don't known / other

Is this a regression?

Yes

Description

This issue was raised on the Applicaiton Insights repo, but we don't define "__name" and according to the people consuming us when they roll back to v20.2 the problem does not occur

Uncaught TypeError: Cannot redefine property: name
at defineProperty ()
at __name (chunk-TJFVSI2U.js:20:33)
at AnalyticsPlugin.js:57:10

microsoft/ApplicationInsights-JS#2643

Based on out analysis thus far this is a bundling / packaging issue that has been introduced in Angular 20.3 and not a specific issue for Application Insights.

Please provide a link to a minimal reproduction of the bug

See link bug

Please provide the exception or error you saw

Uncaught TypeError: Cannot redefine property: name
    at defineProperty (<anonymous>)
    at __name (chunk-TJFVSI2U.js:20:33)
    at AnalyticsPlugin.js:57:10

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


Anything else?

No response

Activity

  1. transferred this issue fromangular/angularon Sep 13, 2025
  2. JeanMeche commented on Sep 13, 2025

    @JeanMeche
    Member
  3. d-koppenhagen commented on Sep 15, 2025

    @d-koppenhagen

    It seems the problem occurs with several @Azure libs.

    I'm running into the same error, but using @azure/communication-calling:

    client:733 [vite] connecting...
    client:827 [vite] connected.
    chunk-QIVBGF7Z.js:29  Uncaught TypeError: Cannot redefine property: name
        at defineProperty (<anonymous>)
        at __name (chunk-QIVBGF7Z.js:29:33)
        at sdk.bundle.js:26:65843
    __name @ chunk-QIVBGF7Z.js:29
    (anonymous) @ sdk.bundle.js:26
    

    where sdk.bundle.js comes from node_modules/@azure/communication-calling/dist-esm/sdk.bundle.js

    I opened another issue for @azure/communication-calling: Azure/azure-sdk-for-js#35940

  4. added
    freq1: low
    on Sep 16, 2025
  5. added theissue type on Sep 16, 2025
  6. added a commit that references this issue on Sep 16, 2025
    2f7c7da
  7. added 2 commits that reference this issue on Sep 16, 2025
    d0631c5
    deb3ed0
  8. angular-automatic-lock-bot commented on Oct 17, 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.

  9. locked and limited conversation to collaborators on Oct 17, 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

    Labels

    area: @angular/buildfreq1: lowseverity5: regressiontype: bug/fix

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions