Title: V8.0.0 : loadChildren library module failed : "Error: Runtime compiler is not loaded" on AOT mode · Issue #14763 · angular/angular-cli · GitHub
Open Graph Title: V8.0.0 : loadChildren library module failed : "Error: Runtime compiler is not loaded" on AOT mode · Issue #14763 · angular/angular-cli
X Title: V8.0.0 : loadChildren library module failed : "Error: Runtime compiler is not loaded" on AOT mode · Issue #14763 · angular/angular-cli
Description: 🐞 bug report Affected Package The issue is caused by package @angular/compiler and/or @angular/core and/or @angular/router Is this a regression? Yes, the previous version in which this bug was not present was: 7.2.1 Description I try to ...
Open Graph Description: 🐞 bug report Affected Package The issue is caused by package @angular/compiler and/or @angular/core and/or @angular/router Is this a regression? Yes, the previous version in which this bug was not ...
X Description: 🐞 bug report Affected Package The issue is caused by package @angular/compiler and/or @angular/core and/or @angular/router Is this a regression? Yes, the previous version in which this bug was not ...
Opengraph URL: https://github.com/angular/angular-cli/issues/14763
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"V8.0.0 : loadChildren library module failed : \"Error: Runtime compiler is not loaded\" on AOT mode","articleBody":"# 🐞 bug report\r\n\r\n### Affected Package\r\nThe issue is caused by package @angular/compiler and/or @angular/core and/or @angular/router\r\n\r\n### Is this a regression?\r\nYes, the previous version in which this bug was not present was: 7.2.1\r\n\r\n### Description\r\nI try to load a project library (named shell) as a route \"loadChildren\", with 2 différents option : \r\n- loadChildren: () => import('shell').then(m => m.ProfileModule)\r\n- loadChildren: () => ProfileModule\r\n\r\nThis 2 ways work correctly on dev mode, but failed on AOT builded mode with an error message. And the route is not loaded.\r\n\r\n\r\n## 🔬 Minimal Reproduction\r\n\r\n### ProfileModule (as an angular library named \"shell\" on the CLI project) : \r\n``` javascript\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\n\r\nimport { ProfileComponent } from './profile/profile.component';\r\nimport { TranslateModule } from '../translate/translate.module';\r\nimport { GhostModule } from '../ghost/ghost.module';\r\nimport { DataModule } from '../data/data.module';\r\nimport { ProfileRoutingModule } from './profile-routing.module';\r\nimport { ProfileCardComponent } from './profile-card/profile-card.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n ProfileComponent,\r\n ProfileCardComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n MatCardModule,\r\n MatListModule,\r\n MatButtonModule,\r\n MatIconModule,\r\n TranslateModule,\r\n FlexLayoutModule,\r\n GhostModule,\r\n DataModule,\r\n ProfileRoutingModule\r\n ],\r\n exports: [\r\n ProfileCardComponent\r\n ]\r\n})\r\nexport class ProfileModule { }\r\n\r\n```\r\n\r\n### AppRoutingModule (as an angular project from the same CLI project)\r\n``` javascript\r\nimport { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nimport { SecureGuard } from 'shell';\r\n\r\nimport { HomeComponent } from './home/home.component';\r\n\r\nexport function loadProfile() {\r\n return import('shell').then(m => m.ProfileModule);\r\n}\r\n\r\nconst routes: Routes = [{\r\n path: '',\r\n canActivate: [SecureGuard],\r\n children: [{\r\n path: '',\r\n component: HomeComponent\r\n }, {\r\n path: 'profile',\r\n loadChildren: loadProfile // Here the error at runtime, the error message appear when I go to /profile\r\n }, {\r\n path: '**',\r\n component: HomeComponent\r\n }]\r\n}];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forRoot(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AppRoutingModule { }\r\n\r\n```\r\n\r\n## 🔥 Exception or Error\r\n\u003cpre>\u003ccode>\r\nUncaught Error: Uncaught (in promise): Error: Runtime compiler is not loaded\r\nError: Runtime compiler is not loaded\r\n at e.Jr (main.41ff3398f5c3f189c836.js:1)\r\n at t.project (main.41ff3398f5c3f189c836.js:1)\r\n at t._tryNext (main.41ff3398f5c3f189c836.js:1)\r\n at t._next (main.41ff3398f5c3f189c836.js:1)\r\n at t.next (main.41ff3398f5c3f189c836.js:1)\r\n at e._subscribe (main.41ff3398f5c3f189c836.js:1)\r\n at e._trySubscribe (main.41ff3398f5c3f189c836.js:1)\r\n at e.subscribe (main.41ff3398f5c3f189c836.js:1)\r\n at e.call (main.41ff3398f5c3f189c836.js:1)\r\n at e.subscribe (main.41ff3398f5c3f189c836.js:1)\r\n at Z (polyfills.06b93379260cc1d8e708.js:1)\r\n at Z (polyfills.06b93379260cc1d8e708.js:1)\r\n at polyfills.06b93379260cc1d8e708.js:1\r\n at e.invokeTask (polyfills.06b93379260cc1d8e708.js:1)\r\n at Object.onInvokeTask (main.41ff3398f5c3f189c836.js:1)\r\n at e.invokeTask (polyfills.06b93379260cc1d8e708.js:1)\r\n at t.runTask (polyfills.06b93379260cc1d8e708.js:1)\r\n at g (polyfills.06b93379260cc1d8e708.js:1)\r\n at t.invokeTask [as invoke] (polyfills.06b93379260cc1d8e708.js:1)\r\n at m (polyfills.06b93379260cc1d8e708.js:1)\r\n\u003c/code>\u003c/pre>\r\n\r\n\r\n## 🌍 Your Environment\r\n\r\n**Angular Version:**\r\n\u003cpre>\u003ccode>\r\nAngular CLI: 8.0.1\r\nNode: 12.4.0\r\nOS: darwin x64\r\nAngular: 8.0.0\r\n... animations, cdk, common, compiler, compiler-cli, core, forms\r\n... language-service, material, material-moment-adapter\r\n... platform-browser, platform-browser-dynamic, router\r\n... service-worker\r\n\r\nPackage Version\r\n------------------------------------------------------------\r\n@angular-devkit/architect 0.800.1\r\n@angular-devkit/build-angular 0.800.1\r\n@angular-devkit/build-ng-packagr 0.800.1\r\n@angular-devkit/build-optimizer 0.800.1\r\n@angular-devkit/build-webpack 0.800.1\r\n@angular-devkit/core 8.0.1\r\n@angular-devkit/schematics 8.0.1\r\n@angular/cli 8.0.1\r\n@angular/flex-layout 8.0.0-beta.26\r\n@angular/pwa 0.800.1\r\n@ngtools/json-schema 1.1.0\r\n@ngtools/webpack 8.0.1\r\n@schematics/angular 8.0.1\r\n@schematics/update 0.800.1\r\nng-packagr 5.2.0\r\nrxjs 6.5.2\r\ntypescript 3.4.5\r\nwebpack 4.30.0\r\n\u003c/code>\u003c/pre>\r\n\r\n**Anything else relevant?**\r\nI try to use on different CLI projects a Profile module from a CLI library (all on the same CLI project). This is not possible since angular 8.0.0\r\n","author":{"url":"https://github.com/robinComa","@type":"Person","name":"robinComa"},"datePublished":"2019-06-07T08:02:12Z","url":"https://github.com/angular/angular-cli/issues/14763"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2c148428-71b4-291d-737e-5fa181b45f12 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8486:EA09B:17362DB:1EBED6D:6B013F13 |
| html-safe-nonce | f9f69dd946daf531ed06335ec105b1fc408cca25bc33f0da10ebd3e0c7b81dbe |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDg2OkVBMDlCOjE3MzYyREI6MUVCRUQ2RDo2QjAxM0YxMyIsInZpc2l0b3JfaWQiOiI4MzkzNjUxNTUxODI2MTY1NTIzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3071dff939d63c7c17d5baa132ebed9e3f112435c7f396055274a81b6663b7ee |
| hovercard-subject-tag | issue:455834486 |
| 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/14763/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8d8d5b9f51cc267d126b495d8e4aabeb37f10002c5cd0b98ff6300594eb589ad/angular/angular-cli/issues/14763 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8d8d5b9f51cc267d126b495d8e4aabeb37f10002c5cd0b98ff6300594eb589ad/angular/angular-cli/issues/14763 |
| og:image:alt | 🐞 bug report Affected Package The issue is caused by package @angular/compiler and/or @angular/core and/or @angular/router Is this a regression? Yes, the previous version in which this bug was not ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | robinComa |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width