I am encountering a problem with deploying my application using the Astro framework on your Vercel platform.
Issue Description
When running the astro check command, I receive an error indicating that the JavaScript heap is out of memory, and the process ends with a memory allocation error.
Technical Details
Project:*MonComptoirSecret
Framework: Astro
Node.js: v20.15.0
Error: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
Steps Already Taken
I attempted to increase the memory allocated to Node.js using NODE_OPTIONS=--max_old_space_size=8192, but the error persists.
I ran analyses with clinic doctor, but the generated report contained no usable data.
Request for Assistance
I am seeking your assistance to:
Diagnose the cause of this memory issue during deployment.
Obtain advice or solutions to resolve this issue and successfully deploy my application.
Thank you in advance for your valuable assistance. If you need more details or additional information, I am at your disposal.
I want to make sure you’re not completely stuck while you try more permanent solutions. You should be able to deploy from a local build using vercel build && vercel deploy --prebuilt as a temporary workaround.
Some people with similar build issues have had success by changing the max_old_space_size to something below the 8192 MB build container memory. Does it work if you change it to NODE_OPTIONS=--max_old_space_size=6144?
Hi amyegan,
Thanks for your quick response and suggestions.
Unfortunately, I have tried the recommended solutions but without success.
I have tried to deploy from a local build using vercel build && vercel deploy --prebuilt, but the issue persists.
We have also changed max_old_space_size to 6144 MB using NODE_OPTIONS=–max_old_space_size=6144, but the build still fails with the same out of memory error.
Additionally, we have looked at the suggestions in Steve Fenton’s guide to handling JavaScript heap out of memory issues with Astro and GitHub Actions. Despite following these steps, the issue remains unresolved.
Will upgrading to Pro make any difference? Or should I move to a more complex hosting provider than Vercel?
Given the critical nature of this project, I am looking for further assistance in overcoming this hurdle. Any additional information or alternative solutions you could provide would be greatly appreciated.
On both… At first I didn’t do it locally because the synchronization was done via commits. When it stopped working I tried locally and failed on both and the same after everything you sent me…