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
ngcc: processing of recently published UMD bundles may fail #44037
Recently, a number of issues (#43870, #43936, #44019) has started to occur for certain UMD bundles when ngcc (the Angular Compatibility Compiler) processes them to create an Ivy-compatible version of the UMD bundle.
Recent changes to how UMD bundles are formatted are not supported by the current Angular Compatibility Compiler (ngcc), which can result in a fatal error, like the following:
TypeError: Cannot read property 'text' of undefined
Error: Failed to find exported name of node
Packages from the @angular scope are not affected, but recent versions of third-party libraries may result in one of the above fatal errors.
In the typical Angular CLI setup UMD bundles are not generally needed, as ES2015 bundles are preferred over UMD. It is therefore expected that CLI users won't be affected by these issues.
Available workarounds
If ngcc is manually executed from outside of the CLI, without the --properties argument, then it will process all available formats in a library including the UMD bundles. In that case, ngcc may fail if a library is used that contains the newly structured code that ngcc is currently unable to understand. It may be that the UMD bundles are not actually necessary, in which case ngcc can be configured not to process the UMD bundles at all. To this effect, pass the --properties es2015 module argument to ngcc.
If you do require the UMD bundles to be processed, for example if you're using Jest for unit testing, then the only workaround that is currently available is to pin the dependency that breaks ngcc to an earlier version which does not contain the problematic code patterns that cause ngcc to fail.
Next steps
Although some of the changes have already been accounted for in the latest Angular 12 releases, we're still working on a solution to resolve all ngcc failures of UMD bundles.
Activity
fix(ngcc): support element accesses for export declarations (#44669)
fix(ngcc): support element accesses for export declarations (#44824)
angular-automatic-lock-bot commentedon Feb 15, 2022
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.