Base solution for your next web application
Open Closed

Loading chunk account-account-module failed. #7828


User avatar
0
timmackey created

After a fresh rebuild of all app components (aspnet-core & angular), whenever I launch the Chrome browser at "localhost:4200" in Visual Studio Code debug, the following error always occurs. Refreshing the browser window will overcome the error and the app will show the login page per normal behavior. Subsequent restarts of the angular code from VS Code debug do not exhibit this error. Using ANZ Version 7.2.3

[WDS] Live Reloading enabled.
Angular is running in the development mode. Call enableProdMode() to enable the production mode.
null: ERROR
null: Error: Uncaught (in promise): ChunkLoadError: Loading chunk account-account-module failed.
message: "Uncaught (in promise): ChunkLoadError: Loading chunk account-account-module failed.
(error: http://localhost:4200/account-account-module.js)
ChunkLoadError: Loading chunk account-account-module failed.
(error: http://localhost:4200/account-account-module.js)
    at Function.requireEnsure [as e] (http://localhost:4200/runtime.js:127:26)
    at loadChildren (http://localhost:4200/main.js:27451:64)
    at RouterConfigLoader.push../node_modules/@angular/router/fesm5/router.js.RouterConfigLoader.loadModuleFactory (http://localhost:4200/vendor.js:88907:39)
    at RouterConfigLoader.push../node_modules/@angular/router/fesm5/router.js.RouterConfigLoader.load (http://localhost:4200/vendor.js:88892:35)
    at MergeMapSubscriber.project (http://localhost:4200/vendor.js:87894:47)
    at MergeMapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._tryNext (http://localhost:4200/vendor.js:216383:27)
    at MergeMapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._next (http://localhost:4200/vendor.js:216373:18)
    at MergeMapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (http://localhost:4200/vendor.js:211078:18)
    at Observable._subscribe (http://localhost:4200/vendor.js:221743:24)
    at Observable.push../node_modules/rxjs/_esm5/internal/Observable.js.Observable._trySubscribe (http://localhost:4200/vendor.js:210460:25)"
promise: ZoneAwarePromise {__zone_symbol__state: 0, __zone_symbol__value: ChunkLoadError: Loading chunk account-account-modu…}
rejection: ChunkLoadError: Loading chunk account-account-module failed.
stack: "Error: Uncaught (in promise): ChunkLoadError: Loading chunk account-account-module failed.
(error: http://localhost:4200/account-account-module.js)
ChunkLoadError: Loading chunk account-account-module failed.
(error: http://localhost:4200/account-account-module.js)
    at Function.requireEnsure [as e] (http://localhost:4200/runtime.js:127:26)
    at loadChildren (http://localhost:4200/main.js:27451:64)
    at RouterConfigLoader.push../node_modules/@angular/router/fesm5/router.js.RouterConfigLoader.loadModuleFactory (http://localhost:4200/vendor.js:88907:39)
    at RouterConfigLoader.push../node_modules/@angular/router/fesm5/router.js.RouterConfigLoader.load (http://localhost:4200/vendor.js:88892:35)
    at MergeMapSubscriber.project (http://localhost:4200/vendor.js:87894:47)
    at MergeMapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._tryNext (http://localhost:4200/vendor.js:216383:27)
    at MergeMapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._next (http://localhost:4200/vendor.js:216373:18)
    at MergeMapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (http://localhost:4200/vendor.js:211078:18)
    at Observable._subscribe (http://localhost:4200/vendor.js:221743:24)
    at Observable.push../node_modules/rxjs/_esm5/internal/Observable.js.Observable._trySubscribe (http://localhost:4200/vendor.js:210460:25)
    at resolvePromise (http://localhost:4200/polyfills.js:10830:35)
    at resolvePromise (http://localhost:4200/polyfills.js:10789:21)
    at http://localhost:4200/polyfills.js:10891:21
    at ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:10425:35)
    at Object.onInvokeTask (http://localhost:4200/vendor.js:70268:33)
    at ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:10424:40)
    at Zone.runTask (http://localhost:4200/polyfills.js:10192:51)
    at drainMicroTaskQueue (http://localhost:4200/polyfills.js:10605:39)
    at ZoneTask.invokeTask [as invoke] (http://localhost:4200/polyfills.js:10511:25)
    at invokeTask (http://localhost:4200/polyfills.js:11665:18)"
task: ZoneTask {_zone: Zone, runCount: 0, _zoneDelegates: null, …}
zone: Zone {_parent: Zone, _name: "angular", _properties: Object, …}
__proto__: Object {constructor: , name: "Error", message: "", …}

2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @timmackey

    Did you figure it out ? We couldn't reproduce it on our side.

  • User Avatar
    0
    timmackey created

    After upgrading Visual Studio Enterprise 2019 to version 16.3.5 and Visual Studio Code to version 1.39.2 the problem disappeared. I have no explanation of how or if upgrading VSs fixed the problem.