Skip to content

Build got failed while using 'ng build ---aot' #14717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kumaresan-subramani opened this issue Jun 10, 2019 · 9 comments
Closed

Build got failed while using 'ng build ---aot' #14717

kumaresan-subramani opened this issue Jun 10, 2019 · 9 comments
Labels
freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix

Comments

@kumaresan-subramani
Copy link

kumaresan-subramani commented Jun 10, 2019

🐞 Bug report

Command (mark with an x)

- [ ] new
- [x] build
- [x] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

NO

Description

I have set "target": "es6", when i try to serve my application using below command

ng serve ---aot

It throws below error:

Screenshot (269)

If i change target to "es2015" and try to run using below commands

ng serve --prod

ng serve --aot

it throws a same error:

Screenshot (271)

Working fine

When using "ng serve" with target es2015 and es6

And all commands are working fine with target as es5

🔬 Minimal Reproduction

  1. Download sample
    angularIssue.zip

  2. Run "npm i"

  3. The give anyone command from below list:

    • ng serve --aot
    • ng build --aot
    • ng serve --prod
    • ng build --prod

🔥 Exception or Error

Screenshot (271)

🌍 Your Environment

"@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",
@alan-agius4 alan-agius4 added comp: devkit/build-optimizer freq1: low Only reported by a handful of users who observe it rarely severity3: broken labels Jun 10, 2019
@ngbot ngbot bot added this to the needsTriage milestone Jun 10, 2019
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Jun 10, 2019
@ngbot ngbot bot removed this from the Backlog milestone Jun 10, 2019
@alan-agius4
Copy link
Collaborator

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.

@kumaresan-subramani
Copy link
Author

kumaresan-subramani commented Jun 10, 2019

Hi @alan-agius4 ,

While using Below three commands build-optimizer must be used

ng serve --aot
ng build ---prod

@alan-agius4
Copy link
Collaborator

alan-agius4 commented Jun 10, 2019

-—aot doesn’t use build optimizer by default only —-prod does.

@kumaresan-subramani

This comment has been minimized.

@kumaresan-subramani
Copy link
Author

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",

@kumaresan-subramani
Copy link
Author

kumaresan-subramani commented Aug 6, 2019

Hi @alan-agius4 ,

Reported issue got resolved in latest release version 8.2.0

@kumaresan-subramani
Copy link
Author

kumaresan-subramani commented Aug 21, 2019

HI @alan-agius4

Still I am facing same issue, can you please re-consider this issue.

Thanks.

@mgechev
Copy link
Member

mgechev commented Aug 21, 2019

Looks like duplicate of #15392. Please provide minimal demo so we can reproduce the problem.

@mgechev mgechev closed this as completed Aug 21, 2019
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Projects
None yet
Development

No branches or pull requests

3 participants