Skip to content

test-esm-addon.mjs fails when building in debug mode #16155

@danbev

Description

@danbev
  • Version: master
  • Platform: Mac OS X
  • Subsystem: module, test

When building with $ ./configure --debug && make -j8 test the the following error is reported:

=== release test-esm-addon ===
Path: es-module/test-esm-addon
(node:35080) ExperimentalWarning: The ESM module loader is experimental.
Error: module ../addons/hello-world/build/Release/binding.node not found
    at module.exports (internal/loader/search.js:14:12)
    at exports.resolve (internal/loader/ModuleRequest.js:91:13)
    at Loader.resolve (internal/loader/Loader.js:50:40)
    at Loader.getModuleJob (internal/loader/Loader.js:78:40)
    at ModuleWrap.module.link (internal/loader/ModuleJob.js:27:25)
    at linked (internal/loader/ModuleJob.js:25:19)
    at <anonymous>
Command: out/Release/node --experimental-modules /Users/danielbevenius/work/nodejs/node/test/es-module/test-esm-addon.mjs
[02:10|% 100|+ 1983|-   1]: Done
make: *** [test] Error 1

The addon tests use ${common.buildType} to determine the buildType, but it seems that only a string literal is allowed for the import so I'm not sure about a proper way to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    addonsIssues and PRs related to native addons.esmIssues and PRs related to the ECMAScript Modules implementation.flaky-testIssues and PRs related to the tests with unstable failures on the CI.testIssues and PRs related to the tests.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions