Why do I get the error “JavaScript heap out of memory” during deployment?

Validated on 13 Nov 2025 • Last edited on 21 Nov 2025

The error FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory means your Node.js build process exceeded the available memory during deployment.

To resolve this issue, increase the Node.js memory limit.

Go to the Apps section of the DigitalOcean Control Panel, click your app, and then click the Settings tab.

Under the Environment Variables heading, click Edit, and then in the Keys field, type NODE_OPTIONS. In the Values field, type --max-old-space-size=4096. Then, redeploy your app.

If your build continues to fail with an out of memory error, try optimizing your build.

How do I fix a "permission denied for schema public" error in my dev database?

Delete the existing dev database and create a new one. Then make sure that the app deployment completes successfully.

Why do I get the error "Domain Already Exists" when trying to add a domain to an app in another account?

You cannot add the same domain name to multiple apps or split an app and domain name across more than one account.

How do I fix an "Image or digest not found" error with multiple registries?

Specify the registry property in the app spec.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.