Skip to content

Commit e52ea46

Browse files
committed
module: fix ERR_REQUIRE_ESM error for null frames
1 parent 89adc16 commit e52ea46

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/internal/errors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ function hideInternalStackFrames(error) {
808808
if (typeof stackFrames === 'object') {
809809
frames = ArrayPrototypeFilter(
810810
stackFrames,
811-
(frm) => !StringPrototypeStartsWith(frm.getFileName(),
811+
(frm) => !StringPrototypeStartsWith(frm.getFileName() || '',
812812
'node:internal')
813813
);
814814
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
require('./package-type-module/cjs.js');
1+
eval("require('./package-type-module/cjs.js')");

0 commit comments

Comments
 (0)