Skip to content

Commit 50a3d33

Browse files
committed
errors: add ERR_AMBIGUOUS_MODULE_SYNTAX message
1 parent c6316f9 commit 50a3d33

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/internal/errors.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,6 +1133,11 @@ E('ERR_ACCESS_DENIED',
11331133
return msg;
11341134
},
11351135
Error);
1136+
1137+
E('ERR_AMBIGUOUS_MODULE_SYNTAX',
1138+
'The module syntax is ambiguous. This file mixes CommonJS (require, module.exports) and ES Module features (import, export, or top-level await). Use either CommonJS or ES Modules consistently in the same file.',
1139+
Error);
1140+
11361141
E('ERR_AMBIGUOUS_ARGUMENT', 'The "%s" argument is ambiguous. %s', TypeError);
11371142
E('ERR_ARG_NOT_ITERABLE', '%s must be iterable', TypeError);
11381143
E('ERR_ASSERTION', '%s', Error);

0 commit comments

Comments
 (0)