Skip to content

Commit 93bbaa0

Browse files
guybedfordtargos
authored andcommitted
module: fix ERR_REQUIRE_ESM error for null frames
PR-URL: #39593 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 6c769cc commit 93bbaa0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎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(typeofstackFrames==='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)