tyranno
The build process consumes excessive memory and fails with a V8 out-of-heap error (JavaScript heap out of memory). The issue appears related to large memory usage during SvelteKit’s sync/build stage. **Environment / Context** Running svelte-kit sync as part of the build process. Using the following svelte.config.js: ``` // svelte.config.js import adapter from '@jesterkit/exe-sveltekit'; import { sveltekit } from '@sveltejs/kit/vite'; export default { kit: { adapter: adapter({ binaryName: 'app' }) }, vitePlugin: { inspector: true }, plugins: [sveltekit()] }; ``` **Warnings observed before the crash:** warning " > @jesterkit/[email protected]" has unmet peer dependency "typescript@^5". warning Workspaces can only be enabled in private projects. **Observed Behavior** The build hangs for several minutes. Eventually, Node.js crashes with a fatal memory error. **Error Details** ---------------------------------------------------------------------------------- $ svelte-kit sync || echo '' <--- Last few GCs ---> [2452:0000022A50B00080] 336045 ms: Mark-Compact 3985.2 (4132.0) -> 3972.4 (4132.5) MB, 1168.76 / 0.05 ms (average mu = 0.169, current mu = 0.065) task; scavenge might not succeed [2452:0000022A50B00080] 337309 ms: Mark-Compact 3986.4 (4132.7) -> 3973.2 (4133.2) MB, 1177.82 / 0.05 ms (average mu = 0.121, current mu = 0.068) task; scavenge might not succeed <--- JS stacktrace ---> FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory ----- Native stack trace ----- 1: 00007FF67F3CBC9B node::SetCppgcReference+19867 2: 00007FF67F33AD78 DSA_meth_get_flags+92952 3: 00007FF67FDB4BB1 v8::Isolate::ReportExternalAllocationLimitReached+65 4: 00007FF67FD9E308 v8::Function::Experimental_IsNopFunction+1336 5: 00007FF67FBFFCE0 v8::Platform::SystemClockTimeMillis+659328 6: 00007FF67FC0BF53 v8::Platform::SystemClockTimeMillis+709107 7: 00007FF67FC098B4 v8::Platform::SystemClockTimeMillis+699220 8: 00007FF67FBFCA00 v8::Platform::SystemClockTimeMillis+646304 9: 00007FF67FBB8968 v8::Platform::SystemClockTimeMillis+367624 10: 00007FF67F2C11E3 X509_STORE_get_cleanup+4803 11: 00007FF67F2BFB96 node::TriggerNodeReport+83462 12: 00007FF67F43178B uv_update_time+491 13: 00007FF67F431304 uv_run+900 14: 00007FF67F4021E5 node::SpinEventLoop+405 15: 00007FF67F2E57CA X509_STORE_get_cleanup+153770 16: 00007FF67F37EE8D node::Start+4957 17: 00007FF67F37DB60 node::Start+48 18: 00007FF67F12D91C AES_cbc_encrypt+151372 19: 00007FF6805D6F0C inflateValidate+19196 20: 00007FFD829CE8D7 BaseThreadInitThunk+23 21: 00007FFD837BC34C RtlUserThreadStart+44