Skip to content

Testing broken on Node.js main branch #1207

Closed

Description

@mhdawson

Fails with:

/home/iojs/build/workspace/node-test-node-addon-api-new/nodes/debian10-x64/node-addon-api/test/index.js:93
process.config.target_defaults.default_configuration =
                                                     ^

TypeError: Cannot assign to read only property 'default_configuration' of object '#<Object>'
    at Object.<anonymous> (/home/iojs/build/workspace/node-test-node-addon-api-new/nodes/debian10-x64/node-addon-api/test/index.js:93:54)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
    at node:internal/main/run_main_module:23:47

Activity

  1. mhdawson commented on Sep 20, 2022

    @mhdawson
    MemberAuthor

    Likely related to nodejs/node@e0ab8dd

  2. mhdawson commented on Sep 20, 2022

    @mhdawson
    MemberAuthor

    This is the code in the test script

    process.config.target_defaults.default_configuration =
      fs
        .readdirSync(path.join(__dirname, process.env.REL_BUILD_PATH || '', 'build'))
        .filter((item) => (item === 'Debug' || item === 'Release'))[0];
    
    
  3. mhdawson commented on Sep 20, 2022

    @mhdawson
    MemberAuthor

    I'm going to remove that code so that the ci tests start running again, that will break the ability to run in debug I think, so I'll leave this issue open until we figure that out.

  4. mhdawson commented on Sep 20, 2022

    @mhdawson
    MemberAuthor

    PR #1208 to remove and get ci working again.

  5. mhdawson commented on Sep 23, 2022

    @mhdawson
    MemberAuthor

    CI is green again.

  6. mhdawson commented on Sep 23, 2022

    @mhdawson
    MemberAuthor
  7. mhdawson commented on Sep 23, 2022

    @mhdawson
    MemberAuthor

    @NickNaso is going to work on doing updates the replace the usage of default_configuration in the existing test files.

    Discussion around how to choose.

    • Command line flag (preferred, by default use Release by default)
    • File system check
  8. NickNaso commented on Dec 9, 2022

    @NickNaso
    Member

    I'm closing the issue because the PR #1226 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions