Repository navigation
Closed
Labels
area: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilerfreq1: lowtype: bug/fix
Milestone
Description
🐞 bug report
Affected Package
The issue is caused by package @angular 8.1.0
Is this a regression?
Yes, the previous version in which this bug was not present was: 7.x
Description
If you use AoT along with strictMetadataEmit enabled and have lazy loaded modules AoT build will throw an error.
🔬 Minimal Reproduction
Clone this repo https://github.com/pawelkondraciuk/angular8-example-app and run ng serve --aot
Nutshell:
// tsconfig.json
"angularCompilerOptions": {
"strictMetadataEmit": true
},
// app-routing.module.ts
{path: '/', loadChildren: () => import('./modules/home/home.module').then(m => m.HomeModule)},
ng serve --aot
🔥 Exception or Error
ERROR in /Users/pawel-kondraciuk/projects/angular8-example-app/src/app/app.module.ts:47:1: Error encountered in metadata generated for exported symbol 'AppModule':
/Users/pawel-kondraciuk/projects/angular8-example-app/src/app/app.module.ts:78:19: Metadata collected contains an error that will be reported at runtime: Lambda not supported.
{"__symbolic":"error","message":"Lambda not supported","line":77,"character":18}
🌍 Your Environment
Angular Version:
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 8.1.1
Node: 10.16.0
OS: darwin x64
Angular: 8.1.3
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.801.3
@angular-devkit/build-angular 0.801.3
@angular-devkit/build-ng-packagr 0.801.3
@angular-devkit/build-optimizer 0.801.3
@angular-devkit/build-webpack 0.801.3
@angular-devkit/core 8.1.3
@angular-devkit/schematics 8.1.1
@angular/cdk 8.1.2
@angular/cli 8.1.1
@ngtools/webpack 8.1.3
@schematics/angular 8.1.1
@schematics/update 0.801.1
ng-packagr 5.4.3
rxjs 6.4.0
typescript 3.4.5
webpack 4.35.2
Metadata
Metadata
Assignees
Labels
area: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilerfreq1: lowtype: bug/fix
Activity
alxhub commentedon Jul 30, 2019
strictMetadataEmitis a flag for libraries, which shouldn't have any lazy loaded modules at all. It's not meant to be used for applications.Closing this issue as it's not actionable for us.
angular-automatic-lock-bot commentedon Sep 15, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.