I have specified my node version as 18.0.0 and --max-old-space-size=16384 but I still get these errors on building.
Ran out of memory (used over 8GB) while building your code.
May 9 01:43:43 AM info - Creating an optimized production build... May 9 01:43:45 AM Browserslist: caniuse-lite is outdated. Please run: May 9 01:43:45 AM npx browserslist@latest --update-db May 9 01:43:45 AM Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating May 9 01:43:45 AM [@Sentry/nextjs] You are using Next.js features that run on the Edge Runtime. Please add a “sentry.edge.config.js” or a “sentry.edge.config.ts” file to your project root in which you initialize the Sentry SDK with “Sentry.init()“. May 9 01:43:50 AM Browserslist: caniuse-lite is outdated. Please run: May 9 01:43:50 AM npx browserslist@latest --update-db May 9 01:43:50 AM Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating May 9 01:48:17 AM info - Compiled successfully May 9 01:48:17 AM info - Collecting page data... May 9 01:53:35 AM Killed May 9 01:53:36 AM ==> Build failed :disappointed:
This issue does not appear to have been solved yet so I have contacted support as well.
I am on the 16 GB instance and I wonder if there’s any way to increase the build container memory as well.
Related thread: The "next build" always fails at the "Collecting page data..." stage - #4 by al_ps