-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular 19.1 -> build error: Cannot read properties of undefined (reading 'map') #29465
Comments
We are experiencing this issue in our application as well after upgrading to I did some debugging and the root cause is the upgrade of esbuild from Looking at the release notes, I'm guessing it's this change from So potentially it sounds like the issue should be fixed in I put together a reproduction of the issue here As a workaround for other people experiencing the issue, we've applied a patch to wrap the sourcemap remapping code inside of a try catch to silence the error and prevent the build from failing:
|
Thank you for loooking into this, @mattlewis92. We should open an upstream issue to address and resolve it. |
An other workaround is to override the version of esbuild in the package.json
|
An other workaround is to disable temporary source map generation on the angular.json file (build configuration part), which will make Sentry unhappy for us. |
Thank you very much @alan-agius4 . Correct source map generation is crucial for us to fully leverage the potential of our error tracking systems. |
Command
build
Is this a regression?
The previous version in which this bug was not present was
19.0
Description
Updating to angular 19.1 I get error just with a simple build command.
It was so difficult to make a simple and small repo to reproduce the issue but finally, I got it!
Here is the repo: https://github.com/meriturva/angular_19_1_issue_build
To reproduce:
and you have the error:
An unhandled exception occurred: Cannot read properties of undefined (reading 'map')
See "C:\Users\diego\AppData\Local\Temp\ng-TSQVA6\angular-errors.log" for further details.
Minimal Reproduction
Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: