Title: Webpack not generating 0.chunk.js for lazy loaded module · Issue #2865 · angular/angular-cli · GitHub
Open Graph Title: Webpack not generating 0.chunk.js for lazy loaded module · Issue #2865 · angular/angular-cli
X Title: Webpack not generating 0.chunk.js for lazy loaded module · Issue #2865 · angular/angular-cli
Description: Please provide us with the following information: OS? Windows 10 Versions. angular-cli: 1.0.0-beta.18 node: 4.6.0 os: win32 x64 webpack 2.1.0-beta.25 (found in build results) Repro steps. Create a new app following install directions on ...
Open Graph Description: Please provide us with the following information: OS? Windows 10 Versions. angular-cli: 1.0.0-beta.18 node: 4.6.0 os: win32 x64 webpack 2.1.0-beta.25 (found in build results) Repro steps. Create a ...
X Description: Please provide us with the following information: OS? Windows 10 Versions. angular-cli: 1.0.0-beta.18 node: 4.6.0 os: win32 x64 webpack 2.1.0-beta.25 (found in build results) Repro steps. Create a ...
Opengraph URL: https://github.com/angular/angular-cli/issues/2865
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Webpack not generating 0.chunk.js for lazy loaded module","articleBody":"\u003e ## Please provide us with the following information:\n### OS?\n\nWindows 10\n### Versions.\n\nangular-cli: 1.0.0-beta.18\nnode: 4.6.0\nos: win32 x64 \nwebpack 2.1.0-beta.25 (found in build results)\n### Repro steps.\n- Create a new app following install directions on angular-cli site page.\n- Used ng g module \u003cmodule.name\u003e to generate 3 modules.\n- Used a combination of John Papa's pluralsight and angular.io tutorials to configure routing with one route setup to lazy load.\n- At design time ng build \u0026 ng serve show no errors.\n- At runtime the error listed below is shown in the console when trying to navigate to the lazy loaded route. \n\nAt build time, I notice that there is no 0.chunk.js file created. In reading through other issues (#2112) that mention this problem, a solution is often given that says the module must be referenced somewhere else in the application. I have gone through every module and component in the app and can find nothing that is attempting to import my admin.module, which I believe is supported by the error messages below.\n### The log given by the failure (from Chrome Developer Tools, Console window)\n\nerror_handler.js:47 \nEXCEPTION: Uncaught (in promise): Error: Cannot find module 'app/admin/admin.routing.module'.\nError: Cannot find module 'app/admin/admin.routing.module'.\n at webpackEmptyContext (http://localhost:4200/main.bundle.js:44890:8)\n at SystemJsNgModuleLoader.loadAndCompile (http://localhost:4200/main.bundle.js:52734:40)\n at SystemJsNgModuleLoader.load (http://localhost:4200/main.bundle.js:52727:60)\n at RouterConfigLoader.loadModuleFactory (http://localhost:4200/main.bundle.js:17422:128)\n at RouterConfigLoader.load (http://localhost:4200/main.bundle.js:17414:81)\n at MergeMapSubscriber.project (http://localhost:4200/main.bundle.js:55360:111)\n at MergeMapSubscriber._tryNext (http://localhost:4200/main.bundle.js:12064:27)\n at MergeMapSubscriber._next (http://localhost:4200/main.bundle.js:12054:18)\n at MergeMapSubscriber.Subscriber.next (http://localhost:4200/main.bundle.js:394:18)\n at ScalarObservable._subscribe (http://localhost:4200/main.bundle.js:26846:24)\n\nerror_handler.js:53 \nError: Uncaught (in promise): Error: Cannot find module 'app/admin/admin.routing.module'.\nError: Cannot find module 'app/admin/admin.routing.module'.\n at webpackEmptyContext (src async:2)\n at SystemJsNgModuleLoader.loadAndCompile (system_js_ng_module_factory_loader.js:45)\n at SystemJsNgModuleLoader.load (system_js_ng_module_factory_loader.js:38)\n at RouterConfigLoader.loadModuleFactory (router_config_loader.js:40)\n at RouterConfigLoader.load (router_config_loader.js:32)\n at MergeMapSubscriber.project (apply_redirects.js:215)\n at MergeMapSubscriber._tryNext (mergeMap.js:110)\n at MergeMapSubscriber._next (mergeMap.js:100)\n at MergeMapSubscriber.Subscriber.next (Subscriber.js:89)\n at ScalarObservable._subscribe (ScalarObservable.js:49)\n at resolvePromise (zone.js:468)\n at zone.js:445\n at ZoneDelegate.invoke (zone.js:232)\n at Object.onInvoke (ng_zone_impl.js:43)\n at ZoneDelegate.invoke (zone.js:231)\n at Zone.run (zone.js:114)\n at zone.js:502\n at ZoneDelegate.invokeTask (zone.js:265)\n at Object.onInvokeTask (ng_zone_impl.js:34)\n at ZoneDelegate.invokeTask (zone.js:264)\n\nzone.js:388 \nUnhandled Promise rejection: Cannot find module 'app/admin/admin.routing.module'. ; Zone: angular ; Task: Promise.then ; Value: Error: Cannot find module 'app/admin/admin.routing.module'.(…) Error: Cannot find module 'app/admin/admin.routing.module'.\n at webpackEmptyContext (http://localhost:4200/main.bundle.js:44890:8)\n at SystemJsNgModuleLoader.loadAndCompile (http://localhost:4200/main.bundle.js:52734:40)\n at SystemJsNgModuleLoader.load (http://localhost:4200/main.bundle.js:52727:60)\n at RouterConfigLoader.loadModuleFactory (http://localhost:4200/main.bundle.js:17422:128)\n at RouterConfigLoader.load (http://localhost:4200/main.bundle.js:17414:81)\n at MergeMapSubscriber.project (http://localhost:4200/main.bundle.js:55360:111)\n at MergeMapSubscriber._tryNext (http://localhost:4200/main.bundle.js:12064:27)\n at MergeMapSubscriber._next (http://localhost:4200/main.bundle.js:12054:18)\n at MergeMapSubscriber.Subscriber.next (http://localhost:4200/main.bundle.js:394:18)\n at ScalarObservable._subscribe (http://localhost:4200/main.bundle.js:26846:24)\n\nzone.js:390 \nError: Uncaught (in promise): Error: Cannot find module 'app/admin/admin.routing.module'.(…)consoleError @ zone.js:390_loop_1 @ zone.js:417drainMicroTaskQueue @ zone.js:421ZoneTask.invoke @ zone.js:339\n### Mention any other details that might be useful.\n\nI have tried all the advice from Issue #2112, but wasn't successful. I zipped and attached my project (minus the node_modules, of course). Any guidance you can provide would be appreciated, thanks! \n[NotLazyLoading.zip](https://github.com/angular/angular-cli/files/548594/NotLazyLoading.zip)\n","author":{"url":"https://github.com/michaeldevenney","@type":"Person","name":"michaeldevenney"},"datePublished":"2016-10-24T18:02:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/2865/angular-cli/issues/2865"}
| 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:e10d138a-c961-4e3a-68cd-37c443d08685 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 99E6:360109:1EE225:27A0F0:6976782D |
| html-safe-nonce | 69d354af3c48ab64c5152c84faa911b0423d9f815d7c5e6dd7f87d94dec09064 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OUU2OjM2MDEwOToxRUUyMjU6MjdBMEYwOjY5NzY3ODJEIiwidmlzaXRvcl9pZCI6Ijc4MDkwNDk4OTA4NTA3NjQ4NDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 055c5e9f5ba301cbc552956095578a1f52a851945c2f548deb621153f078ef9a |
| hovercard-subject-tag | issue:184912193 |
| 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/2865/issue_layout |
| twitter:image | https://opengraph.githubassets.com/45eb9569d0aab3c4c8995721d68285440ad918967cab104403a987b8556530b7/angular/angular-cli/issues/2865 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/45eb9569d0aab3c4c8995721d68285440ad918967cab104403a987b8556530b7/angular/angular-cli/issues/2865 |
| og:image:alt | Please provide us with the following information: OS? Windows 10 Versions. angular-cli: 1.0.0-beta.18 node: 4.6.0 os: win32 x64 webpack 2.1.0-beta.25 (found in build results) Repro steps. Create a ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | michaeldevenney |
| hostname | github.com |
| expected-hostname | github.com |
| None | 032152924a283b83384255d9489e7b93b54ba01da8d380b05ecd3953b3212411 |
| 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 | 5b577f6be6482e336e3c30e8daefa30144947b17 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width