From e38898355817df7af322c05a74b7d536a660bc12 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Sat, 18 Mar 2023 04:04:54 -0700 Subject: [PATCH] feat: support node19 (#1862) --- prelude/bootstrap.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/prelude/bootstrap.js b/prelude/bootstrap.js index 034bd153d..585673793 100644 --- a/prelude/bootstrap.js +++ b/prelude/bootstrap.js @@ -1879,7 +1879,11 @@ function payloadFileSync(pointer) { im = require('internal/module'); makeRequireFunction = im.makeRequireFunction; } else { - im = require('internal/modules/cjs/helpers'); + if (NODE_VERSION_MAJOR <= 18) { + im = require('internal/modules/cjs/helpers'); + } else { + im = require('internal/modules/helpers'); + } makeRequireFunction = im.makeRequireFunction; // TODO esm modules along with cjs }