Title: Unable to serve or build app due to runtime ChunkLoadError · Issue #22525 · angular/angular-cli · GitHub
Open Graph Title: Unable to serve or build app due to runtime ChunkLoadError · Issue #22525 · angular/angular-cli
X Title: Unable to serve or build app due to runtime ChunkLoadError · Issue #22525 · angular/angular-cli
Description: 🐞 Bug report Command (mark with an x) new build serve test e2e generate add update lint extract-i18n run config help version doc Is this a regression? Yes, the previous version in which this bug was not present was: 13.0.4 Description Wh...
Open Graph Description: 🐞 Bug report Command (mark with an x) new build serve test e2e generate add update lint extract-i18n run config help version doc Is this a regression? Yes, the previous version in which this bug wa...
X Description: 🐞 Bug report Command (mark with an x) new build serve test e2e generate add update lint extract-i18n run config help version doc Is this a regression? Yes, the previous version in which this bug wa...
Opengraph URL: https://github.com/angular/angular-cli/issues/22525
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unable to serve or build app due to runtime ChunkLoadError","articleBody":"\u003c!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅\r\n\r\nOh hi there! 😄\r\n\r\nTo expedite issue processing please search open and closed issues before submitting a new one.\r\nExisting issues often contain information about workarounds, resolution, or progress updates.\r\n\r\n🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅--\u003e\r\n\r\n# 🐞 Bug report\r\n\r\n### Command (mark with an `x`)\r\n\r\n\u003c!-- Can you pin-point the command or commands that are effected by this bug? --\u003e\r\n\u003c!-- ✍️edit: --\u003e\r\n\r\n- [ ] new\r\n- [x] build\r\n- [x] serve\r\n- [ ] test\r\n- [ ] e2e\r\n- [ ] generate\r\n- [ ] add\r\n- [ ] update\r\n- [ ] lint\r\n- [ ] extract-i18n\r\n- [ ] run\r\n- [ ] config\r\n- [ ] help\r\n- [ ] version\r\n- [ ] doc\r\n\r\n### Is this a regression?\r\n\r\n\u003c!-- Did this behavior use to work in the previous version? --\u003e\r\nYes, the previous version in which this bug was not present was: 13.0.4\r\n\r\n### Description\r\n\r\nWhen starting or building our app after upgrading to angular 13 we get a `ChunkLoadError` in the browser console at runtime because webpack isn't emitting a the .js file for that chunk. There are no build errors in the console, and weirdly after a few incremental rebuilds the problem fixes itself. After some digging I found the root cause was this PR: https://github.com/angular/angular-cli/pull/22239 If I disable the `NamedChunksPlugin` in the webpack config, then the problem goes away and everything works as expected.\r\n\r\n\r\n## 🔬 Minimal Reproduction\r\n\r\nReproducing this outside of our app is hard. If you're willing to sign an NDA I can just give you access to the repo to debug it yourselves, or if you can give me some instructions on how to debug it my end to find the root cause I'm also happy to do that.\r\n\r\n## 🔥 Exception or Error\r\n\r\n\u003cpre\u003e\u003ccode\u003eERROR Error: Uncaught (in promise): ChunkLoadError: Loading chunk default-libs_comment_common_src_lib_comments_comment_module_ts-libs_task_comment-bar_src_lib_-ca5e7c failed.\r\n(error: http://localhost:4200/default-libs_comment_common_src_lib_comments_comment_module_ts-libs_task_comment-bar_src_lib_-ca5e7c.js)\r\nChunkLoadError: Loading chunk default-libs_comment_common_src_lib_comments_comment_module_ts-libs_task_comment-bar_src_lib_-ca5e7c failed.\r\n(error: http://localhost:4200/default-libs_comment_common_src_lib_comments_comment_module_ts-libs_task_comment-bar_src_lib_-ca5e7c.js)\r\n\u003c/code\u003e\u003c/pre\u003e\r\n\r\n## 🌍 Your Environment\r\n\r\n\u003cpre\u003e\u003ccode\u003eAngular CLI: 13.1.3\r\nNode: 16.13.1\r\nPackage Manager: npm 6.14.15\r\nOS: darwin arm64\r\n\r\nAngular: 13.1.2\r\n... animations, common, compiler, compiler-cli, core, elements\r\n... forms, language-service, localize, platform-browser\r\n... platform-browser-dynamic, router, service-worker\r\n\r\nPackage Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect 0.1301.2\r\n@angular-devkit/build-angular 13.1.3\r\n@angular-devkit/core 13.1.2\r\n@angular-devkit/schematics 13.1.2\r\n@angular/cdk 13.1.1\r\n@angular/cli 13.1.3\r\n@angular/google-maps 12.2.1\r\n@schematics/angular 13.1.3\r\nng-packagr 13.1.2\r\nrxjs 7.4.0\r\ntypescript 4.5.4\r\n\u003c/code\u003e\u003c/pre\u003e\r\n\r\n**Anything else relevant?**\r\n\r\n\u003c!-- ✍️Is this a browser specific issue? If so, please specify the browser and version. --\u003e\r\n\r\n\u003c!-- ✍️Do any of these matter: operating system, IDE, package manager, HTTP server, ...? If so, please mention it below. --\u003e\r\n","author":{"url":"https://github.com/mattlewis92","@type":"Person","name":"mattlewis92"},"datePublished":"2022-01-19T14:44:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/22525/angular-cli/issues/22525"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f9f2d9e0-2c89-ae16-c579-747767f3ae0d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BE88:24429C:45A102:5ABFB1:6A5FF2D3 |
| html-safe-nonce | 4e2ad857014fe464b9d6d95eda195a229d3ec22dd9bd46661af5bc765c306449 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTg4OjI0NDI5Qzo0NUExMDI6NUFCRkIxOjZBNUZGMkQzIiwidmlzaXRvcl9pZCI6IjMxMzY4MjI3OTk0MTMyNzczOTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f6aec42e9601e25772f571bf7faca74047a0936dad8f216bc52a62a142849cf7 |
| hovercard-subject-tag | issue:1108188648 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/22525/issue_layout |
| twitter:image | https://opengraph.githubassets.com/50407d7514295fd9e67ae3af5a477357257845b15a4b20ecb06f8890e5b68b35/angular/angular-cli/issues/22525 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/50407d7514295fd9e67ae3af5a477357257845b15a4b20ecb06f8890e5b68b35/angular/angular-cli/issues/22525 |
| og:image:alt | 🐞 Bug report Command (mark with an x) new build serve test e2e generate add update lint extract-i18n run config help version doc Is this a regression? Yes, the previous version in which this bug wa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mattlewis92 |
| hostname | github.com |
| expected-hostname | github.com |
| None | ec26f1a08b78b3d576999ee8b45a2abc017c95dbee903a8019940cd2e9bf7b3d |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0a29f0b91ade2368fc0b74327c0f64ec1f98f5ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width