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 }