Skip to content

Troubleshooting

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 for further assistance.

Error invalid source release: 21

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

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 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:

"capawesome:build": "NODE_OPTIONS='--max-old-space-size=4096' npm run build"