build issue in angular 11 when enabling --aot

Sakthi Prabhakaran's Avatar

Sakthi Prabhakaran

21 Apr, 2021 06:13 AM

Hi Team,

When we enable aot in build build getting failed and same working in local. can you please suggest.
npm ERR! code ELIFECYCLE
npm ERR! errno 3221226505
npm ERR! autovhc@0.0.0 build:ea: `ng build --configuration=ea`
npm ERR! Exit status 3221226505
npm ERR!
npm ERR! Failed at the autovhc@0.0.0 build:ea script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\appveyor\AppData\Roaming\npm-cache\_logs\2021-04-21T05_50_59_972Z-debug.log
Command exited with code -1073740791

  1. Support Staff 1 Posted by Feodor Fitsner on 21 Apr, 2021 05:32 PM

    Feodor Fitsner's Avatar

    It could be anything. Have you tried increasing Node heap size via --max_old_space_size=8192 argument (or environment variable)?

  2. Support Staff 2 Posted by Feodor Fitsner on 21 Apr, 2021 05:37 PM

    Feodor Fitsner's Avatar
  3. 3 Posted by Sakthi Prabhaka... on 22 Apr, 2021 06:38 AM

    Sakthi Prabhakaran's Avatar

    set NODE_OPTIONS=--max_old_space_size=8192, when we set this , build not working
    we have configured in appveyor.yml, same when we set this to 7168 build working but with error when we enable --aot

  4. Support Staff 4 Posted by Feodor Fitsner on 23 Apr, 2021 12:44 AM

    Feodor Fitsner's Avatar

    What version of Node do you use? Could you drop me a link to a build please?

    Also, you may try running the build on GCP environment to see if that makes a difference. Add this environment variable to project settings or appveyor.yml:

    APPVEYOR_BUILD_WORKER_CLOUD: gce
    
  5. 5 Posted by Sakthi Prabhaka... on 23 Apr, 2021 07:58 AM

    Sakthi Prabhakaran's Avatar

    Hi Team,
    Node Vision we are using: 12.13.0
    https://ci.appveyor.com/project/BTCSolutions/autovhcclientv3-dev2/build/job/v0xob9d26rmia8u6
    - when I try above as well same issue

    Thanks,
    Sakthi.K

  6. Support Staff 6 Posted by Feodor Fitsner on 24 Apr, 2021 04:47 PM

    Feodor Fitsner's Avatar

    Try using 64-bit version of Node by adding x64 at the end of the command:

    appveyor-retry powershell Install-Product node $env:nodejs_version x64
    

    Also, try 14.x Node.

  7. 7 Posted by Sakthi Prabhaka... on 26 Apr, 2021 08:44 AM

    Sakthi Prabhakaran's Avatar

    Thanks Feodor, Build working now but it taking 9 to 10 min for each build

  8. Support Staff 8 Posted by Feodor Fitsner on 27 Apr, 2021 12:06 AM

    Feodor Fitsner's Avatar

    I guess AOT is quite compute-intensive feature. Definitely, cloud VMs do not have the same performance as your local development machine, so you can see a lower performance there.

    You were trialing custom build workers on GCP (4 cores, more GHz) about a year ago. Maybe you'd like to do it again to see if it performs better?

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • aotbuild.png 40.1 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac