---
description: Fix common native build errors in Capawesome Cloud. Resolve Java version, invalid source release, and other build issues with step-by-step solutions.
title: Troubleshooting Native Builds - Capawesome
image: https://capawesome.io/docs/assets/images/social/cloud/native-builds/troubleshooting.png
---

[ Skip to content](#troubleshooting) 

[ 🎉 Introducing **Capawesome Platform** — one platform for Live Updates, Native Builds, App Store Publishing, and Insider SDKs.](https://capawesome.io) 

* [  Formbricks ](/docs/plugins/formbricks/)
* [  Geocoder ](/docs/plugins/geocoder/)
* [  Google Sign-In ](/docs/plugins/google-sign-in/)
* [  libSQL ](/docs/plugins/libsql/)
* [  Live Update ](/docs/plugins/live-update/)
* [  Managed Configurations ](/docs/plugins/managed-configurations/)
* [  Media Session ](/docs/plugins/media-session/)
* [  ML Kit ](/docs/plugins/mlkit/)
* [  NFC ](/docs/plugins/nfc/)
* [  OAuth ](/docs/plugins/oauth/)
* [  Pedometer ](/docs/plugins/pedometer/)
* [  Photo Editor ](/docs/plugins/photo-editor/)
* [  PostHog ](/docs/plugins/posthog/)
* [  Printer ](/docs/plugins/printer/)
* [  Purchases ](/docs/plugins/purchases/)
* [  RealtimeKit ](/docs/plugins/realtimekit/)
* [  Screen Orientation ](/docs/plugins/screen-orientation/)
* [  Screenshot ](/docs/plugins/screenshot/)
* [  Secure Preferences ](/docs/plugins/secure-preferences/)
* [  Speech Recognition ](/docs/plugins/speech-recognition/)
* [  Speech Synthesis ](/docs/plugins/speech-synthesis/)
* [  Share Target ](/docs/plugins/share-target/)
* [  Square Mobile Payments ](/docs/plugins/square-mobile-payments/)
* [  SQLite ](/docs/plugins/sqlite/)
* [  Superwall ](/docs/plugins/superwall/)
* [  Torch ](/docs/plugins/torch/)
* [  Wifi ](/docs/plugins/wifi/)
* [  Zip ](/docs/plugins/zip/)
* [  Cloud ](/docs/cloud/)
* [  Live Updates ](/docs/cloud/live-updates/)
* Advanced
* Integrations
* [  Native Builds ](/docs/cloud/native-builds/)
* [  Configuration ](/docs/cloud/native-builds/configuration/)
* [  Environments ](/docs/cloud/native-builds/environments/)
* Guides
* [  Sample Projects ](/docs/cloud/native-builds/sample-projects/)
* Troubleshooting [  Troubleshooting ](/docs/cloud/native-builds/troubleshooting/)
* [  Automations ](/docs/cloud/automations/)
* [  Assist ](/docs/cloud/assist/)
* Account
* Organizations
* [  Organization and User Management ](/docs/cloud/organizations/memberships/)
* [  Single Sign-On (SSO) ](/docs/cloud/organizations/sso/)
* [  Teams ](/docs/cloud/organizations/teams/)
* [  Two-Factor Authentication ](/docs/cloud/organizations/two-factor-authentication/)
* [  Integrations ](/docs/cloud/integrations/)
* [  License Keys ](/docs/cloud/license-keys/)
* [  Webhooks ](/docs/cloud/webhooks/)
* [  Pricing ](https://capawesome.io/pricing/)
* [  FAQ ](/docs/cloud/faq/)
* [  Support ](/docs/cloud/support/)
* [  Contributing ](/docs/contributing/)
* [  LLMs ](/docs/llms/)
* [  Insiders ](/docs/insiders/)
* [  License ](https://capawesome.io/legal/eula/)
* [  Support ](/docs/insiders/support/)
* [  FAQ ](/docs/insiders/faq/)
* [  Blog ](/blog/)
* Categories

# Troubleshooting[¶](#troubleshooting "Permanent link")

This troubleshooting guide addresses common issues encountered during native builds in Capawesome Cloud. If you experience any of the following errors, follow the provided solutions to resolve them. You can also [contact support](/contact/) for further assistance.

## Error `invalid source release: 21`[¶](#error-invalid-source-release-21 "Permanent link")

This error typically occurs when the wrong Java version is being used for the build. To resolve this issue, ensure that you have set the `JAVA_VERSION` [environment variable](/docs/cloud/native-builds/environments/#reserved-environment) to a supported version, such as `17` or `21`, in your build environment. For Capacitor 7, Java 21 is the default version.

## Error `JavaScript heap out of memory`[¶](#error-javascript-heap-out-of-memory "Permanent link")

This error occurs when Node.js runs out of memory during the web build step (e.g. `pnpm build` or `npm run build`). The default heap limit is approximately 2 GB, which may not be enough for large projects. To fix this, add `NODE_OPTIONS` as an [environment variable](/docs/cloud/native-builds/environments/) in your build environment with the value `--max-old-space-size=4096`. This increases the limit to 4 GB. If that's still not enough, you can try `8192` (8 GB).

Alternatively, you can set `NODE_OPTIONS` directly in your build script in `package.json`:

`[](#%5F%5Fcodelineno-0-1)"capawesome:build": "NODE_OPTIONS='--max-old-space-size=4096' npm run build"
`

May 7, 2026 

 Back to top 