Skip to content

module: add dynamic file-specific ESM warnings #68142

module: add dynamic file-specific ESM warnings

module: add dynamic file-specific ESM warnings #68142

Triggered via pull request February 19, 2025 14:56
Status Failure
Total duration 1h 11m 24s
Artifacts

test-linux.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 1 notice
test-linux: test/es-module/test-typescript-commonjs.mjs#L1
--- stdout --- Test failure: 'expect failure of an .mts file with CommonJS syntax' Location: test/es-module/test-typescript-commonjs.mjs:61:1 AssertionError [ERR_ASSERTION]: The input did not match the regular expression /Failed to load the ES module: \/home\/runner\/work\/node\/node\/dir%20with $unusual"chars?'åß∂ƒ©∆¬…`\/test\/fixtures\/typescript\/cts\/test-cts-but-module-syntax.cts\. Make sure to set "type": "module" in the nearest package\.json file or use the \.mjs extension\./. Input: '(node:265546) Warning: Failed to load the ES module: /home/runner/work/node/node/dir%20with $unusual"chars?\'åß∂ƒ©∆¬…`/test/fixtures/typescript/cts/test-cts-but-module-syntax.cts. Make sure to set "type": "module" in the nearest package.json file or use the .mjs extension.\n' + '(Use `node --trace-warnings ...` to show where the warning was created)\n' + '/home/runner/work/node/node/dir%20with $unusual"chars?\'åß∂ƒ©∆¬…`/test/fixtures/typescript/cts/test-cts-but-module-syntax.cts:1\n' + "import util from 'node:util';\n" + '^^^^^^\n' + '\n' + 'SyntaxError: Cannot use import statement outside a module\n' + ' at wrapSafe (node:internal/modules/cjs/loader:1666:18)\n' + ' at Module._compile (node:internal/modules/cjs/loader:1708:20)\n' + ' at Object.loadCTS [as .cts] (node:internal/modules/cjs/loader:1797:10)\n' + ' at Module.load (node:internal/modules/cjs/loader:1469:32)\n' + ' at Function._load (node:internal/modules/cjs/loader:1286:12)\n' + ' at TracingChannel.traceSync (node:diagnostics_channel:322:14)\n' + ' at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)\n' + ' at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:151:5)\n' + ' at node:internal/main/run_main_module:33:47\n' + '\n' + 'Node.js v24.0.0-pre\n' at TestContext.<anonymous> (file:///home/runner/work/node/node/dir%20with%20$unusual%22chars%3F'%C3%A5%C3%9F%E2%88%82%C6%92%C2%A9%E2%88%86%C2%AC%E2%80%A6%60/test/es-module/test-typescript-commonjs.mjs:69:12) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async Test.run (node:internal/test_runner/test:990:9) at async Test.processPendingSubtests (node:internal/test_runner/test:680:7) { generatedMessage: true, code: 'ERR_ASSERTION', actual: '(node:265546) Warning: Failed to load the ES module: /home/runner/work/node/node/dir%20with $unusual"chars?\'åß∂ƒ©∆¬…`/test/fixtures/typescript/cts/test-cts-but-module-syntax.cts. Make sure to set "type": "module" in the nearest package.json file or use the .mjs extension.\n' + '(Use `node --trace-warnings ...` to show where the warning was created)\n' + '/home/runner/work/node/node/dir%20with $unusual"chars?\'åß∂ƒ©∆¬…`/test/fixtures/typescript/cts/test-cts-but-module-syntax.cts:1\n' + "import util from 'node:util';\n" + '^^^^^^\n' + '\n' + 'SyntaxError: Cannot use import statement outside a module\n' + ' at wrapSafe (node:internal/modules/cjs/loader:1666:18)\n' + ' at Module._compile (node:internal/modules/cjs/loader:1708:20)\n' + ' at Object.loadCTS [as .cts] (node:internal/modules/cjs/loader:1797:10)\n' + '...', expected: 'Failed to load the ES module: /home/runner/work/node/node/dir%20with $unusual"chars?\'åß∂ƒ©∆¬…`/test/fixtures/typescript/cts/test-cts-but-module-syntax.cts. Make sure to set "type": "module" in the nearest package.json file or use the .mjs extension.', operator: 'includes' } Command: out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout "/home/runner/work/node/node/dir%20with $unusual"chars?'åß∂ƒ©∆¬…`/test/es-module/test-typescript-commonjs.mjs"
test-linux
Process completed with exit code 1.
sccache stats
0% - 0 hits, 0 misses, 0 errors