x)
- [ ] new
- [x] build
- [x] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
NO
I have set "target": "es6", when i try to serve my application using below command
ng serve ---aot
It throws below error:

If i change target to "es2015" and try to run using below commands
ng serve --prod
ng serve --aot
it throws a same error:

When using "ng serve" with target es2015 and es6
And all commands are working fine with target as es5
Download sample
angularIssue.zip
Run "npm i"
The give anyone command from below list:

"@angular-devkit/build-angular": "^0.800.2", "@angular-devkit/build-optimizer": "^0.800.2", "@angular/cli": "~8.0.0", "@angular/compiler-cli": "~8.0.0",
At first it thought it was caused by Build Optimizer based on the above screenshots but it seems that it also fails when not using Build Optimizer.
Hi @alan-agius4 ,
While using Below three commands build-optimizer must be used
ng serve --aot
ng build ---prod
-βaot doesnβt use build optimizer by default only β-prod does.
Hi @alan-agius4 ,
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { GridModule, PageService } from '@syncfusion/ej2-angular-grids';
import { AppComponent } from './app.component';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, GridModule],
providers: [PageService],
bootstrap: [AppComponent]
})
export class AppModule {}
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { GridModule, PageService } from '@syncfusion/ej2-angular-grids';
import { AppComponent } from './app.component';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, GridModule],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {}
I have only provided service but i didn't use in my application level
The same issue persists in the latest release also
"@angular/animations": "~8.1.0-next.2", "@angular/common": "~8.1.0-next.2", "@angular/compiler": "~8.1.0-next.2", "@angular/core": "~8.1.0-next.2", "@angular/forms": "~8.1.0-next.2", "@angular/platform-browser": "~8.1.0-next.2", "@angular/platform-browser-dynamic": "~8.1.0-next.2", "@angular/router": "~8.1.0-next.2",
Hi @alan-agius4 ,
Reported issue got resolved in latest release version 8.2.0
HI @alan-agius4
Still I am facing same issue, can you please re-consider this issue.
Thanks.
Looks like duplicate of https://github.com/angular/angular-cli/issues/15392. Please provide minimal demo so we can reproduce the problem.
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._
Most helpful comment
At first it thought it was caused by Build Optimizer based on the above screenshots but it seems that it also fails when not using Build Optimizer.