diff --git a/lib/runtime.func b/lib/runtime.func index 3a7f5ef..1409db6 100644 --- a/lib/runtime.func +++ b/lib/runtime.func @@ -1370,6 +1370,12 @@ setup_nodejs() { fi fi + # npm 11+ skips install hooks not covered by allowScripts and still exits 0, + # so apps with native addons install with nothing built. + if [[ "$(npm -v 2>/dev/null | cut -d. -f1)" -ge 11 ]]; then + $STD npm config set dangerously-allow-all-scripts true --location=global 2>/dev/null || true + fi + # Set a safe default heap limit for Node.js builds if not explicitly provided. # Priority: # 1) NODE_OPTIONS (caller/user override)