You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

构建Ionic-4 Android项目遇阻:ES5打包阶段出现调用重试超限错误

Fixing "Call retries were exceeded" During Ionic 4 ES5 Bundle Generation

Hey there, let's sort out that frustrating hang-up when building your Ionic 4 Android project—specifically when it gets stuck on Generating ES5 bundles for differential loading and throws that Call retries were exceeded error from jest-worker. This usually boils down to resource constraints, outdated dependencies, or code quirks, so here are actionable fixes to get your build moving again:

  • Boost Node.js memory allocation
    The most common culprit here is insufficient RAM for the bundling process. Try running your build with an increased memory limit:
    node --max-old-space-size=8192 ./node_modules/@angular/cli/bin/ng build --prod
    Adjust the 8192 value (which equals 8GB) based on how much free memory your system has—start with 4096 if 8GB is too high for your setup.

  • Update your core dependencies
    Outdated versions of jest-worker, Angular CLI, or Ionic packages often trigger this retry error. Run these commands to bring everything up to date:

    npm update @angular/cli
    npm update jest-worker
    ionic update
    

    After updating, delete your node_modules folder, package-lock.json file, and run npm install to do a fresh install—this clears out any conflicting old files that might be causing issues.

  • Temporarily disable differential loading
    If you need a quick workaround to get a build out, you can skip generating dual ES5/ES6 bundles. Open your angular.json file, find the architect > build > options section, and add:

    "target": "es5"
    

    Note: This is a short-term fix—differential loading helps support older browsers, so you'll want to resolve the root issue and re-enable it later.

  • Scan for circular dependencies
    Circular imports in your code can cause the bundler to get stuck in a loop. Use madge to check for these:
    npx madge --circular src/
    Fix any circular references it flags—even small ones can gum up the ES5 transpilation process.

  • Wipe build cache and artifacts
    Stale cache files might be causing unexpected hangs. Run these commands to start with a clean slate:

    ionic build --clean
    npm cache clean --force
    

The jest-worker error happens because the child processes handling the bundling can't complete their tasks within the allowed retry limit—usually due to memory shortages, stuck code paths, or dependency conflicts. These fixes should cover most scenarios, but if you're still stuck, double-check your custom webpack config (if you have one) for any rules that might be slowing down ES5 transpilation.

内容的提问来源于stack exchange,提问作者Rohit Verma

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 09:06:20