René's URL Explorer Experiment


Title: Cannot read property 'loadChildren' of undefined · Issue #4686 · angular/angular-cli · GitHub

Open Graph Title: Cannot read property 'loadChildren' of undefined · Issue #4686 · angular/angular-cli

X Title: Cannot read property 'loadChildren' of undefined · Issue #4686 · angular/angular-cli

Description: Please provide us with the following information: OS? Windows 10 Versions. @angular/cli: 1.0.0-beta.30 node: 6.9.1 os: win32 x64 @angular/common: 2.4.7 @angular/compiler: 2.4.7 @angular/core: 2.4.7 @angular/forms: 2.4.7 @angular/http: 2....

Open Graph Description: Please provide us with the following information: OS? Windows 10 Versions. @angular/cli: 1.0.0-beta.30 node: 6.9.1 os: win32 x64 @angular/common: 2.4.7 @angular/compiler: 2.4.7 @angular/core: 2.4.7...

X Description: Please provide us with the following information: OS? Windows 10 Versions. @angular/cli: 1.0.0-beta.30 node: 6.9.1 os: win32 x64 @angular/common: 2.4.7 @angular/compiler: 2.4.7 @angular/core: 2.4.7...

Opengraph URL: https://github.com/angular/angular-cli/issues/4686

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cannot read property 'loadChildren' of undefined","articleBody":"> Please provide us with the following information:\r\n> ---------------------------------------------------------------\r\n\r\n### OS?\r\nWindows 10\r\n\r\n### Versions.\r\n@angular/cli: 1.0.0-beta.30\r\nnode: 6.9.1\r\nos: win32 x64\r\n@angular/common: 2.4.7\r\n@angular/compiler: 2.4.7\r\n@angular/core: 2.4.7\r\n@angular/forms: 2.4.7\r\n@angular/http: 2.4.7\r\n@angular/platform-browser: 2.4.7\r\n@angular/platform-browser-dynamic: 2.4.7\r\n@angular/router: 3.4.7\r\n@angular/cli: 1.0.0-beta.30\r\n@angular/compiler-cli: 2.4.7\r\n\r\n### Repro steps.\r\n**feature.module.ts**\r\nUsing @nglibs/i18n-router to provide route translations for feature modules (lazy loaded).\r\n\r\n```\r\nimport { I18NRouterModule } from '@nglibs/i18n-router';\r\n\r\n@NgModule({\r\n  imports: [\r\n    CommonModule,\r\n    // RouterModule.forChild(routes)\r\n    I18NRouterModule.forChild(routes, 'about')\r\n  ],\r\n  declarations: [\r\n    AboutComponent,\r\n    AboutUsComponent,\r\n    AboutBananaComponent,\r\n    AboutApplePearComponent\r\n  ]\r\n})\r\n```\r\n\r\nThe whole solution is located on github: angular-cli branch of [@nglibs/example-app](https://github.com/nglibs/example-app/tree/angular-cli).\r\n\r\n### The log given by the failure.\r\nCan't talk about a stack trace, but hope it will be helpful:\r\n\r\n```\r\n$ ng serve\r\n** NG Live Development Server is running on http://localhost:4200. **\r\nHash: ddefd75abb9ca8b82bd4                                                      Time: 18958ms\r\nchunk    {0} polyfills.bundle.js, polyfills.bundle.map (polyfills) 222 kB {4} [initial] [rendered]\r\nchunk    {1} main.bundle.js, main.bundle.map (main) 8.61 kB {3} [initial] [rendered]\r\nchunk    {2} styles.bundle.js, styles.bundle.map (styles) 10 kB {4} [initial] [rendered]\r\nchunk    {3} vendor.bundle.js, vendor.bundle.map (vendor) 3.49 MB [initial] [rendered]\r\nchunk    {4} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry] [rendered]\r\n\r\nERROR in Cannot read property 'loadChildren' of undefined\r\nwebpack: Failed to compile.\r\n```\r\n\r\n### Mention any other details that might be useful.\r\n\r\n**`@nglibs/i18n-router`** does not work with **`@angular-cli`** (*yet*), and giving the following error during [AoT compilation]:\r\n\r\n> `ERROR in Cannot read property 'loadChildren' of undefined`\r\n\r\nI suppose **`@angular-cli`** uses **`@ngtools/webpack`** for [AoT compilation], expecting `RouterModule.forChild(...)` to resolve lazy-loaded modules (*with `loadChildren`*), which is replaced by `I18NRouterModule.forChild(...)` - providing routes for **feature modules** instead.\r\n\r\nHere's the piece of code from [i18n-router module line 72](https://github.com/nglibs/i18n-router/blob/master/index.ts#L72), which provides child routes.\r\n```\r\n                {\r\n                    provide: ROUTES,\r\n                    useFactory: (provideChildRoutes),\r\n                    deps: [I18NRouterService, RAW_ROUTES, MODULE_KEY],\r\n                    multi: true\r\n                },\r\n                {\r\n                    provide: ANALYZE_FOR_ENTRY_COMPONENTS,\r\n                    useValue: routes,\r\n                    multi: true\r\n                }\r\n```\r\n\r\nIt provides `ROUTES` and `ANALYZE_FOR_ENTRY_COMPONENTS` to Angular the same way that the router module does (see below):\r\n- https://github.com/angular/angular/blob/master/modules/%40angular/router/src/router_module.ts#L170\r\n- https://github.com/angular/angular/blob/master/modules/%40angular/router/src/router_module.ts#L204\r\n\r\nHowever, angular-cli seems insisting ignoring the provided child routes and firing errors.\r\n\r\nTo resolve this issue temporarily, I switched using [ng-router-loader]. Hence **`@angular-cli`** doesn't allow **modifying** the **webpack configuration**, I need to **manually** configure **build tools** (*dev/prod sever, task runners, webpack, etc*).\r\n\r\nI think `loadChildren` should be able to recognize routes provided with `ROUTES` and `ANALYZE_FOR_ENTRY_COMPONENTS`.\r\n","author":{"url":"https://github.com/fulls1z3","@type":"Person","name":"fulls1z3"},"datePublished":"2017-02-14T11:21:38Z","url":"https://github.com/angular/angular-cli/issues/4686"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a910935b-debd-1205-11b9-e56f9d53d3e5
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9940:EDA7A:C29F3D:F84ADA:6B00FDC4
html-safe-nonceab21c5b7da18e2a4db6446e0411c5be501cf07060a41f83bce6c7118f4ef5101
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTQwOkVEQTdBOkMyOUYzRDpGODRBREE6NkIwMEZEQzQiLCJ2aXNpdG9yX2lkIjoiMjAyMTUyODU1ODQwNDQzNTM5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace39cb8b8a357b1a40bf700dbec4e9b138af3fdef9560a3d7a2f552e809704593
hovercard-subject-tagissue:207488278
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/4686/issue_layout
twitter:imagehttps://opengraph.githubassets.com/15720b90698d557cf934e08e3a0427228ad5fec00c84e18071d5e1ff9e831a94/angular/angular-cli/issues/4686
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/15720b90698d557cf934e08e3a0427228ad5fec00c84e18071d5e1ff9e831a94/angular/angular-cli/issues/4686
og:image:altPlease provide us with the following information: OS? Windows 10 Versions. @angular/cli: 1.0.0-beta.30 node: 6.9.1 os: win32 x64 @angular/common: 2.4.7 @angular/compiler: 2.4.7 @angular/core: 2.4.7...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamefulls1z3
hostnamegithub.com
expected-hostnamegithub.com
Nonee208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187
turbo-cache-controlno-preview
go-importgithub.com/angular/angular-cli git https://github.com/angular/angular-cli.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id36891867
octolytics-dimension-repository_nwoangular/angular-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id36891867
octolytics-dimension-repository_network_root_nwoangular/angular-cli
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7dafd017fb7809a839c443dba08622af38e63c09
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular-cli/issues/4686#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F4686
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F4686
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular-cli
Reloadhttps://github.com/angular/angular-cli/issues/4686
Reloadhttps://github.com/angular/angular-cli/issues/4686
Reloadhttps://github.com/angular/angular-cli/issues/4686
angularhttps://github.com/angular
angular-clihttps://github.com/angular/angular-cli
Codehttps://github.com/angular/angular-cli
Issues198 (198)https://github.com/angular/angular-cli/issues
Pull requests23 (23)https://github.com/angular/angular-cli/pulls
Actionshttps://github.com/angular/angular-cli/actions
Security and quality8 (8)https://github.com/angular/angular-cli/security
Insightshttps://github.com/angular/angular-cli/insights
https://github.com/angular/angular-cli
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/4686
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/4686
Cannot read property 'loadChildren' of undefinedhttps://github.com/angular/angular-cli/issues/4686#top
https://github.com/fulls1z3
fulls1z3https://github.com/fulls1z3
on Feb 14, 2017https://github.com/angular/angular-cli/issues/4686#issue-207488278
@nglibs/example-apphttps://github.com/nglibs/example-app/tree/angular-cli
i18n-router module line 72https://github.com/nglibs/i18n-router/blob/master/index.ts#L72
https://github.com/angular/angular/blob/master/modules/%40angular/router/src/router_module.ts#L170https://github.com/angular/angular/blob/master/modules/%40angular/router/src/router_module.ts#L170
https://github.com/angular/angular/blob/master/modules/%40angular/router/src/router_module.ts#L204https://github.com/angular/angular/blob/master/modules/%40angular/router/src/router_module.ts#L204
https://github.com/Meligy
Meligyhttps://github.com/Meligy
on Feb 14, 2017https://github.com/angular/angular-cli/issues/4686#issuecomment-279695311
https://github.com/angular/angular/blob/master/modules/%40angular/compiler-cli/src/ngtools_impl.ts#L56https://github.com/angular/angular/blob/master/modules/%40angular/compiler-cli/src/ngtools_impl.ts#L56
https://github.com/filipesilva
filipesilvahttps://github.com/filipesilva
on Mar 13, 2017https://github.com/angular/angular-cli/issues/4686#issuecomment-286165195
#4541https://github.com/angular/angular-cli/issues/4541
filipesilvahttps://github.com/filipesilva
completedhttps://github.com/angular/angular-cli/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Mar 13, 2017https://github.com/angular/angular-cli/issues/4686#event-997574529
https://github.com/fulls1z3
fulls1z3https://github.com/fulls1z3
on Mar 14, 2017https://github.com/angular/angular-cli/issues/4686#issuecomment-286421587
@filipesilvahttps://github.com/filipesilva
#4541https://github.com/angular/angular-cli/issues/4541
@christopherthielenhttps://github.com/christopherthielen
https://github.com/fulls1z3
fulls1z3https://github.com/fulls1z3
on Mar 20, 2017https://github.com/angular/angular-cli/issues/4686#issuecomment-287696510
@christopherthielenhttps://github.com/christopherthielen
#4541https://github.com/angular/angular-cli/issues/4541
https://github.com/bevlison
bevlisonhttps://github.com/bevlison
on Feb 20, 2018https://github.com/angular/angular-cli/issues/4686#issuecomment-366975197
https://github.com/akash-potdar7
akash-potdar7https://github.com/akash-potdar7
on Jun 25, 2018https://github.com/angular/angular-cli/issues/4686#issuecomment-399853333
https://github.com/tomsaleeba
tomsaleebahttps://github.com/tomsaleeba
on Jun 27, 2018https://github.com/angular/angular-cli/issues/4686#issuecomment-400572965
https://github.com/thiagofrancisquete
thiagofrancisquetehttps://github.com/thiagofrancisquete
on Sep 2, 2018https://github.com/angular/angular-cli/issues/4686#issuecomment-417938553
@tomsaleebahttps://github.com/tomsaleeba
https://github.com/skorenb
skorenbhttps://github.com/skorenb
on Sep 3, 2018https://github.com/angular/angular-cli/issues/4686#issuecomment-418097034
@tomsaleebahttps://github.com/tomsaleeba
https://github.com/tomsaleeba
tomsaleebahttps://github.com/tomsaleeba
on Sep 6, 2018https://github.com/angular/angular-cli/issues/4686#issuecomment-419070381
@thiagofrancisquetehttps://github.com/thiagofrancisquete
@KorenBhttps://github.com/KorenB
https://github.com/vsagar9944
vsagar9944https://github.com/vsagar9944
on Sep 13, 2018https://github.com/angular/angular-cli/issues/4686#issuecomment-421023752
https://github.com/tokiodeo
tokiodeohttps://github.com/tokiodeo
on Oct 17, 2018https://github.com/angular/angular-cli/issues/4686#issuecomment-430580035
@bevlisonhttps://github.com/bevlison
https://github.com/klst-speterson
klst-spetersonhttps://github.com/klst-speterson
on Jan 3, 2019https://github.com/angular/angular-cli/issues/4686#issuecomment-451309911
https://github.com/RasicN
RasicNhttps://github.com/RasicN
on Jan 28, 2019https://github.com/angular/angular-cli/issues/4686#issuecomment-458217717
herehttps://github.com/angular/angular/issues/22700
https://github.com/sanidz
sanidzhttps://github.com/sanidz
on Feb 19, 2019https://github.com/angular/angular-cli/issues/4686#issuecomment-465045368
https://github.com/esiva
esivahttps://github.com/esiva
on Apr 16, 2019https://github.com/angular/angular-cli/issues/4686#issuecomment-483626275
https://github.com/Uirado
Uiradohttps://github.com/Uirado
on Jun 28, 2019https://github.com/angular/angular-cli/issues/4686#issuecomment-506863196
https://github.com/rcollette
rcollettehttps://github.com/rcollette
on Jul 8, 2019https://github.com/angular/angular-cli/issues/4686#issuecomment-509055260
https://github.com/vladimiry
vladimiryhttps://github.com/vladimiry
on Jul 18, 2019https://github.com/angular/angular-cli/issues/4686#issuecomment-512825139
https://github.com/gbertoncelli
gbertoncellihttps://github.com/gbertoncelli
on Jul 26, 2019https://github.com/angular/angular-cli/issues/4686#issuecomment-515383868
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Sep 9, 2019https://github.com/angular/angular-cli/issues/4686#issuecomment-529612963
automatic conversation locking policyhttps://github.com/angular/angular/blob/67d80f/docs/GITHUB_PROCESS.md#conversation-locking
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Sep 9, 2019https://github.com/angular/angular-cli/issues/4686#event-2619750369
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular-cli/issues/4686
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/4686
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.