Skip to content

Commit fdb49e1

Browse files
author
Tajudeen
committed
Increase maxBuffer for Alpine Node.js extraction to handle v22+ binaries
- Increased buffer from 100MB to 500MB in extractAlpinefromDocker function - Fixes ENOBUFS error when extracting Node.js 22.20.0 from Docker - Node.js v22+ binaries are larger and exceed previous 100MB limit
1 parent 6d338c2 commit fdb49e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build/gulpfile.reh.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ function getNodeChecksum(expectedName) {
160160
function extractAlpinefromDocker(nodeVersion, platform, arch) {
161161
const imageName = arch === 'arm64' ? 'arm64v8/node' : 'node';
162162
log(`Downloading node.js ${nodeVersion} ${platform} ${arch} from docker image ${imageName}`);
163-
const contents = cp.execSync(`docker run --rm ${imageName}:${nodeVersion}-alpine /bin/sh -c 'cat \`which node\`'`, { maxBuffer: 100 * 1024 * 1024, encoding: 'buffer' });
163+
// Increased buffer size to 500MB to handle larger Node.js binaries (v22+)
164+
const contents = cp.execSync(`docker run --rm ${imageName}:${nodeVersion}-alpine /bin/sh -c 'cat \`which node\`'`, { maxBuffer: 500 * 1024 * 1024, encoding: 'buffer' });
164165
return es.readArray([new File({ path: 'node', contents, stat: { mode: parseInt('755', 8) } })]);
165166
}
166167

0 commit comments

Comments
 (0)