Skip to content

test: added node constraint for native esm test#2589

Merged
aryamohanan merged 1 commit into
mainfrom
chore-esm-v18
Jun 9, 2026
Merged

test: added node constraint for native esm test#2589
aryamohanan merged 1 commit into
mainfrom
chore-esm-v18

Conversation

@aryamohanan

@aryamohanan aryamohanan commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

v18 tests failing

@instana/collector: node:internal/modules/cjs/loader:1200
@instana/collector:     throw new ERR_REQUIRE_ESM(filename, true);
@instana/collector:     ^
@instana/collector: Error [ERR_REQUIRE_ESM]: require() of ES Module /artifacts/node_modules/square-calc/index.mjs not supported.
@instana/collector: Instead change the require of /artifacts/node_modules/square-calc/index.mjs to a dynamic import() which is available in all CommonJS modules.
@instana/collector:     at Function.patchedModuleLoad [as _load] (/artifacts/packages/collector/test/integration/misc/native_esm/_v1.0.0/node_modules/@instana/core/src/util/requireHook.js:94:34)
@instana/collector:     at Object.<anonymous> (/artifacts/packages/collector/test/integration/misc/native_esm/_v1.0.0/app.js:18:25) {
@instana/collector:   code: 'ERR_REQUIRE_ESM'
@instana/collector: }
@instana/collector: Node.js v18.20.8

require(esm) support from v20.19. Added the constraint.

@aryamohanan aryamohanan requested a review from a team as a code owner June 9, 2026 08:09
@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

@aryamohanan aryamohanan merged commit f32246f into main Jun 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants