Skip to content

fix: improve ERR_AMBIGUOUS_MODULE_SYNTAX error message #78649

fix: improve ERR_AMBIGUOUS_MODULE_SYNTAX error message

fix: improve ERR_AMBIGUOUS_MODULE_SYNTAX error message #78649

Re-run triggered December 10, 2025 18:48
Status Failure
Total duration 2h 33m 39s
Artifacts

test-linux.yml

on: pull_request
Matrix: test-linux
Fit to window
Zoom out
Zoom in

Annotations

4 errors and 2 notices
test-linux (ubuntu-24.04-arm)
Process completed with exit code 2.
test-linux (ubuntu-24.04-arm): test/es-module/test-esm-detect-ambiguous.mjs#L460
--- stdout --- Test failure: 'should throw an ambiguous syntax error when using top-level await with module' Location: test/es-module/test-esm-detect-ambiguous.mjs:450:3 AssertionError [ERR_ASSERTION]: The input did not match the regular expression /ReferenceError: Cannot determine intended module format because both module and top-level await are present\. If the code is intended to be CommonJS, wrap await in an async function\. If the code is intended to be an ES module, replace module with import\./. Input: '' at TestContext.<anonymous> (file:///home/runner/work/node/node/node/test/es-module/test-esm-detect-ambiguous.mjs:460:12) at process.processTicksAndRejections (node:internal/process/task_queues:103:5) at async Test.run (node:internal/test_runner/test:1102:7) at async Suite.processPendingSubtests (node:internal/test_runner/test:777:7) { generatedMessage: true, code: 'ERR_ASSERTION', actual: '', expected: /ReferenceError: Cannot determine intended module format because both module and top-level await are present\. If the code is intended to be CommonJS, wrap await in an async function\. If the code is intended to be an ES module, replace module with import\./, operator: 'match', diff: 'simple' } Command: out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/runner/work/node/node/node/test/es-module/test-esm-detect-ambiguous.mjs
test-linux (ubuntu-24.04)
Process completed with exit code 2.
test-linux (ubuntu-24.04): test/es-module/test-esm-detect-ambiguous.mjs#L460
--- stdout --- Test failure: 'should throw an ambiguous syntax error when using top-level await with module' Location: test/es-module/test-esm-detect-ambiguous.mjs:450:3 AssertionError [ERR_ASSERTION]: The input did not match the regular expression /ReferenceError: Cannot determine intended module format because both module and top-level await are present\. If the code is intended to be CommonJS, wrap await in an async function\. If the code is intended to be an ES module, replace module with import\./. Input: '' at TestContext.<anonymous> (file:///home/runner/work/node/node/node/test/es-module/test-esm-detect-ambiguous.mjs:460:12) at process.processTicksAndRejections (node:internal/process/task_queues:103:5) at async Test.run (node:internal/test_runner/test:1102:7) at async Suite.processPendingSubtests (node:internal/test_runner/test:777:7) { generatedMessage: true, code: 'ERR_ASSERTION', actual: '', expected: /ReferenceError: Cannot determine intended module format because both module and top-level await are present\. If the code is intended to be CommonJS, wrap await in an async function\. If the code is intended to be an ES module, replace module with import\./, operator: 'match', diff: 'simple' } Command: out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/runner/work/node/node/node/test/es-module/test-esm-detect-ambiguous.mjs
sccache stats
0% - 0 hits, 0 misses, 0 errors
sccache stats
0% - 0 hits, 0 misses, 0 errors