Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

astro check tool reached heap limit allocation failed (JavaScript heap out of memory) at Node.js 22 #11097

Closed
1 task
koddr opened this issue May 18, 2024 · 1 comment
Labels
needs repro Issue needs a reproduction

Comments

@koddr
Copy link

koddr commented May 18, 2024

Astro Info

Astro                    v4.8.6
Node                     v22.1.0
System                   macOS (arm64)
Package Manager          npm
Output                   server
Adapter                  @astrojs/node
Integrations             @astrojs/vue
                         @astrojs/tailwind

If this issue only occurs in one browser, which browser is a problem?

N/A

Describe the Bug

# ...

dist/client/_astro/runtime-dom.esm-bundler.tkyxWcJq.js:5:45 - warning ts(6133): 't' is declared but its value is never read.

5 **//*! #__NO_SIDE_EFFECTS__ */function Us(e,t){const s=new Set(e.split(","));return n=>s.has(n)}const Q={},st=[],xe=()=>{},ai=()=>!1,Rt=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ks=e=>e.startsWith("onUpdate:"),le=Object.assign,Ds=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},hi=Object.prototype.hasOwnProperty,W=(e,t)=>hi.call(e,t),N=Array.isArray,nt=e=>Ot(e)==="[object Map]",ns=e=>Ot(e)==="[object Set]",pn=e=>Ot(e)==="[object Date]",V=e=>typeof e=="function",se=e=>typeof e=="string",Pe=e=>typeof e=="symbol",Z=e=>e!==null&&typeof e=="object",Xn=e=>(Z(e)||V(e))&&V(e.then)&&V(e.catch),Zn=Object.prototype.toString,Ot=e=>Zn.call(e),di=e=>Ot(e).slice(8,-1),Qn=e=>Ot(e)==="[object Object]",ks=e=>se(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,rt=Us(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),rs=e=>{const t=Object.create(null);return s=>t[s]||(t[s]=e(s))},pi=/-(\w)/g,Me=rs(e=>e.replace(pi,(t,s)=>s?s.toUpperCase():"")),gi=/\B([A-Z])/g,ze=rs(e=>e.replace(gi,"-$1").toLowerCase()),is=rs(e=>e.charAt(0).toUpperCase()+e.slice(1)),bs=rs(e=>e?`on${is(e)}`:""),De=(e,t)=>!Object.is(e,t),Kt=(e,t)=>{for(let s=0;s<e.length;s++)e[s](t)},zn=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},qt=e=>{const t=parseFloat(e);return isNaN(t)?e:t},_i=e=>{const t=se(e)?Number(e):NaN;return isNaN(t)?e:t};let gn;const er=()=>gn||(gn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ls(e){if(N(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],r=se(n)?xi(n):ls(n);if(r)for(const i in r)t[i]=r[i]}return t}else if(se(e)||Z(e))return e}const mi=/;(?![^(]*\))/g,yi=/:([^]+)/,bi=/\/\*[^]*?\*\//g;function xi(e){const t={};return e.replace(bi,"").split(mi).forEach(s=>{if(s){const n=s.split(yi);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function os(e){let t="";if(se(e))t=e;else if(N(e))for(let s=0;s<e.length;s++){const n=os(e[s]);n&&(t+=n+" ")}else if(Z(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}function Jo(e){if(!e)return null;let{class:t,style:s}=e;return t&&!se(t)&&(e.class=os(t)),s&&(e.style=ls(s)),e}const wi="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ci=Us(wi);function tr(e){return!!e||e===""}function Ei(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=cs(e[n],t[n]);return s}function cs(e,t){if(e===t)return!0;let s=pn(e),n=pn(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=Pe(e),n=Pe(t),s||n)return e===t;if(s=N(e),n=N(t),s||n)return s&&n?Ei(e,t):!1;if(s=Z(e),n=Z(t),s||n){if(!s||!n)return!1;const r=Object.keys(e).length,i=Object.keys(t).length;if(r!==i)return!1;for(const l in e){const o=e.hasOwnProperty(l),f=t.hasOwnProperty(l);if(o&&!f||!o&&f||!cs(e[l],t[l]))return!1}}return String(e)===String(t)}function vi(e,t){return e.findIndex(s=>cs(s,t))}const Yo=e=>se(e)?e:e==null?"":N(e)||Z(e)&&(e.toString===Zn||!V(e.toString))?JSON.stringify(e,sr,2):String(e),sr=(e,t)=>t&&t.__v_isRef?sr(e,t.value):nt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,r],i)=>(s[xs(n,i)+" =>"]=r,s),{})}:ns(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>xs(s))}:Pe(t)?xs(t):Z(t)&&!N(t)&&!Qn(t)?String(t):t,xs=(e,t="")=>{var s;return Pe(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
                                              ~

<--- Last few GCs --->

[89426:0x140008000]    29613 ms: Mark-Compact 4039.1 (4129.0) -> 4035.6 (4141.7) MB, pooled: 0 MB, 862.92 / 0.00 ms  (average mu = 0.441, current mu = 0.278) allocation failure; scavenge might not succeed
[89426:0x140008000]    31619 ms: Mark-Compact 4051.4 (4142.2) -> 4045.1 (4151.0) MB, pooled: 0 MB, 1965.83 / 0.00 ms  (average mu = 0.208, current mu = 0.020) allocation failure; scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

----- Native stack trace -----

 1: 0x1047d5228 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/opt/homebrew/Cellar/node/22.1.0/bin/node]
 2: 0x10495c5e0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/opt/homebrew/Cellar/node/22.1.0/bin/node]
 3: 0x10495c594 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/opt/homebrew/Cellar/node/22.1.0/bin/node]
 4: 0x104b054ac v8::internal::Heap::CallGCPrologueCallbacks(v8::GCType, v8::GCCallbackFlags, v8::internal::GCTracer::Scope::ScopeId) [/opt/homebrew/Cellar/node/22.1.0/bin/node]
 5: 0x104b04328 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/opt/homebrew/Cellar/node/22.1.0/bin/node]
 6: 0x104afa7f8 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/homebrew/Cellar/node/22.1.0/bin/node]
 7: 0x104afaf64 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/homebrew/Cellar/node/22.1.0/bin/node]
 8: 0x104ae2350 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/opt/homebrew/Cellar/node/22.1.0/bin/node]
 9: 0x104dfba84 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/opt/homebrew/Cellar/node/22.1.0/bin/node]
10: 0x1045c9c74 Builtins_CEntry_Return1_ArgvOnStack_NoBuiltinExit [/opt/homebrew/Cellar/node/22.1.0/bin/node]
11: 0x10e615018 
12: 0x10dc2ff5c 
13: 0x10e851134 
14: 0x10dba2c98 
15: 0x10e86a308 
16: 0x10e3892c4 
17: 0x10e614650 
18: 0x10dc2ff5c 
19: 0x10e851134 
20: 0x10dc339ac 
21: 0x10dc3027c 
22: 0x10e851134 
23: 0x10dba2c98 
24: 0x10e86a308 
25: 0x10e3892c4 
26: 0x10e614650 
27: 0x10dc2ff5c 
28: 0x10e851134 
29: 0x10eb188c8 
30: 0x10e69f6ac 
31: 0x10e850dfc 
32: 0x10dc339ac 
33: 0x10dc3027c 
34: 0x10e624de8 
35: 0x10e9e3ff0 
36: 0x10dace4e0 
37: 0x10e622884 
38: 0x10e86a308 
39: 0x10dba19ec 
40: 0x10e614624 
41: 0x10dc2ff5c 
42: 0x10e851134 
43: 0x10dc339ac 
44: 0x10dc3027c 
45: 0x10e851134 
46: 0x10daec014 
47: 0x10eb2f968 
48: 0x10e61467c 
49: 0x10dc2ff5c 
50: 0x10e851134 
51: 0x10eb188c8 
52: 0x10e69756c 
53: 0x10dbfa344 
54: 0x10e850dc8 
55: 0x10daebf3c 
56: 0x10dace4e0 
57: 0x10e62dd64 
58: 0x10e635e04 
59: 0x10e628798 
60: 0x10dbb13f0 
61: 0x10e98a220 
62: 0x10e622af8 
63: 0x10e86a308 
64: 0x10dba19ec 
65: 0x10e614624 
66: 0x10dc2ff5c 
67: 0x10e851134 
68: 0x10dc339ac 
69: 0x10dc3027c 
70: 0x10e851134 
71: 0x10e87a4d8 
72: 0x10dace4e0 
73: 0x10e622738 
74: 0x10e86a308 
75: 0x10dba19ec 
76: 0x10ea6f000 
77: 0x10dd22a5c 
78: 0x10dd2719c 
79: 0x10e674500 
80: 0x1045f87dc Builtins_ArrayMap [/opt/homebrew/Cellar/node/22.1.0/bin/node]
81: 0x104534ef0 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/22.1.0/bin/node]
82: 0x10e5685b8 
83: 0x104534ef0 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/22.1.0/bin/node]
84: 0x104571410 Builtins_AsyncFunctionAwaitResolveClosure [/opt/homebrew/Cellar/node/22.1.0/bin/node]
85: 0x10463c578 Builtins_PromiseFulfillReactionJob [/opt/homebrew/Cellar/node/22.1.0/bin/node]
86: 0x104561714 Builtins_RunMicrotasks [/opt/homebrew/Cellar/node/22.1.0/bin/node]
87: 0x104532af4 Builtins_JSRunMicrotasksEntry [/opt/homebrew/Cellar/node/22.1.0/bin/node]
88: 0x104a6fb54 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/opt/homebrew/Cellar/node/22.1.0/bin/node]
89: 0x104a7025c v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/opt/homebrew/Cellar/node/22.1.0/bin/node]
90: 0x104a93ad8 v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) [/opt/homebrew/Cellar/node/22.1.0/bin/node]
91: 0x104a93868 v8::internal::MicrotaskQueue::PerformCheckpointInternal(v8::Isolate*) [/opt/homebrew/Cellar/node/22.1.0/bin/node]
92: 0x1046e8b90 node::InternalCallbackScope::Close() [/opt/homebrew/Cellar/node/22.1.0/bin/node]
93: 0x10476ed0c node::Environment::RunTimers(uv_timer_s*) [/opt/homebrew/Cellar/node/22.1.0/bin/node]
94: 0x108a2b7e8 uv__run_timers [/opt/homebrew/Cellar/libuv/1.48.0/lib/libuv.1.dylib]
95: 0x108a2ea58 uv_run [/opt/homebrew/Cellar/libuv/1.48.0/lib/libuv.1.dylib]
96: 0x1046e9990 node::SpinEventLoopInternal(node::Environment*) [/opt/homebrew/Cellar/node/22.1.0/bin/node]
97: 0x10481d79c node::NodeMainInstance::Run(node::ExitCode*, node::Environment*) [/opt/homebrew/Cellar/node/22.1.0/bin/node]
98: 0x10481d47c node::NodeMainInstance::Run() [/opt/homebrew/Cellar/node/22.1.0/bin/node]
99: 0x104793030 node::Start(int, char**) [/opt/homebrew/Cellar/node/22.1.0/bin/node]
100: 0x19a18a0e0 start [/usr/lib/dyld]

What's the expected result?

Run astro check with no fatal errors.

Link to Minimal Reproducible Example

N/A

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label May 18, 2024
@ematipico ematipico added needs repro Issue needs a reproduction and removed needs triage Issue needs to be triaged labels May 18, 2024
Copy link
Contributor

Hello @koddr. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs repro will be closed if they have no activity within 3 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue needs a reproduction
Projects
None yet
Development

No branches or pull requests

2 participants