Skip to content

Test failures on AIX #1654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mhdawson opened this issue Apr 24, 2025 · 10 comments
Open

Test failures on AIX #1654

mhdawson opened this issue Apr 24, 2025 · 10 comments

Comments

@mhdawson
Copy link
Member

Since April 19 there seem to be test failures on AIX - https://ci.nodejs.org/view/x%20-%20Abi%20stable%20module%20API/job/node-test-node-addon-api-new/nodes=aix72-ppc64/10225/console

They seems to be at the npm install step:

npm-cache
npmrc
Cloning into 'node-addon-api'...
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm error code 1
npm error path /home/iojs/build/workspace/node-test-node-addon-api-new/nodes/aix72-ppc64/node-addon-api/node_modules/unrs-resolver
npm error command failed
npm error command bash -c napi-postinstall unrs-resolver check
npm error [[email protected]] Trying to install package "@unrs/resolver-binding-wasm32-wasi" using npm
npm error [[email protected]] Failed to install package "@unrs/resolver-binding-wasm32-wasi" using npm: Command failed: npm install --loglevel=error --prefer-offline --no-audit --progress=false --cpu=wasm32 @unrs/[email protected]
npm error npm error code EBADPLATFORM
npm error npm error notsup Unsupported platform for @unrs/[email protected]: wanted {"cpu":"wasm32"} (current: {"cpu":"ppc64"})
npm error npm error notsup Valid cpu:  wasm32
npm error npm error notsup Actual cpu: ppc64
npm error npm error A complete log of this run can be found in: /home/iojs/build/workspace/node-test-node-addon-api-new/nodes/aix72-ppc64/npm-cache/_logs/2025-04-24T15_54_43_834Z-debug-0.log
npm error
npm error [[email protected]] Trying to download "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.7.0.tgz"
npm error [[email protected]] Failed to download "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.7.0.tgz": Could not find "package/resolver.wasm32-wasi.node" in archive
npm error /home/iojs/build/workspace/node-test-node-addon-api-new/nodes/aix72-ppc64/node-addon-api/node_modules/napi-postinstall/lib/index.js:140
npm error                     throw new Error(`Failed to install package "${pkg}": ${(0, helpers_js_1.getErrorMessage)(err)}`);
npm error                           ^
npm error
npm error Error: Failed to install package "@unrs/resolver-binding-wasm32-wasi": Could not find "package/resolver.wasm32-wasi.node" in archive
npm error     at checkAndPreparePackage (/home/iojs/build/workspace/node-test-node-addon-api-new/nodes/aix72-ppc64/node-addon-api/node_modules/napi-postinstall/lib/index.js:140:27)
npm error     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
npm error
npm error Node.js v22.15.0
npm error A complete log of this run can be found in: /home/iojs/build/workspace/node-test-node-addon-api-new/nodes/aix72-ppc64/npm-cache/_logs/2025-04-24T15_53_39_915Z-debug-0.log
@richardlau
Copy link
Member

I'm not sure yet what path has led to installing unrs-resolver, but that module was updated on 19 April to include a new napi-postinstall dependency to "workaround npm's bug":

https://github.com/un-ts/napi-postinstall is new (created on the same 19 April 2025) and it probably doesn't know what to do with AIX, e.g. https://github.com/un-ts/napi-postinstall/blob/b2917626cf9f315afed00384a25354a7958848f9/src/helpers.ts#L170-L249.

@mhdawson
Copy link
Member Author

This seems to be the related npm tree that pulls it in:

─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── @nolyfill/[email protected]
│ │ ├── [email protected] deduped
│ │ ├── [email protected] deduped
│ │ ├── UNMET OPTIONAL DEPENDENCY eslint-plugin-import@*
│ │ ├── [email protected] deduped
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected] deduped
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ └── [email protected] deduped
│ │ └─┬ [email protected]
│ │   ├── UNMET OPTIONAL DEPENDENCY @unrs/[email protected]
│ │   ├── UNMET OPTIONAL DEPENDENCY @unrs/[email protected]
│ │   ├── UNMET OPTIONAL DEPENDENCY @unrs/[email protected]
│ │   ├── UNMET OPTIONAL DEPENDENCY @unrs/[email protected]
│ │   ├── UNMET OPTIONAL DEPENDENCY @unrs/[email protected]
│ │   ├── UNMET OPTIONAL DEPENDENCY @unrs/[email protected]
│ │   ├── UNMET OPTIONAL DEPENDENCY @unrs/[email protected]
│ │   ├── UNMET OPTIONAL DEPENDENCY @unrs/[email protected]
│ │   ├── UNMET OPTIONAL DEPENDENCY @unrs/[email protected]
│ │   ├── UNMET OPTIONAL DEPENDENCY @unrs/[email protected]
│ │   ├── UNMET OPTIONAL DEPENDENCY @unrs/[email protected]
│ │   ├── @unrs/[email protected]
│ │   ├── @unrs/[email protected]
│ │   ├── UNMET OPTIONAL DEPENDENCY @unrs/[email protected]
│ │   ├── UNMET OPTIONAL DEPENDENCY @unrs/[email protected]
│ │   ├── UNMET OPTIONAL DEPENDENCY @unrs/[email protected]
│ │   ├── UNMET OPTIONAL DEPENDENCY @unrs/[email protected]
│ │   └── [email protected]

@mhdawson
Copy link
Member Author

neostandard has been pulled in for quite some time (at least 5 months or longer) and was last updated 4 months ago.

@mhdawson
Copy link
Member Author

In eslint-import-resolver-typescript is says - "unrs-resolver": "^1.6.2" so it does make sense we'd be pulling in the changes @richardlau pointed to earlier and that would be causing the issue.

@mhdawson
Copy link
Member Author

Checking to see if a short term work around might be to make sure we don't install dev dependencies in the CI job.

@mhdawson
Copy link
Member Author

@abmusse could you take a look at PRing in the case needed for AIX into unrs-resolver?

@richardlau
Copy link
Member

Checking to see if a short term work around might be to make sure we don't install dev dependencies in the CI job.

@mhdawson another short term work around might be using npm overrides to downgrade unrs-resolver.

@mhdawson
Copy link
Member Author

Added the part which strips neostandard from the list of deps in an existing block for aix as follows:

  if [ $OS == "aix" ]; then
    # otherwise the default shell is used and we may get errors about "--" not being supported
    npm config set script-shell "bash"
    mv package.json package.json.org
    cat package.json.org |grep -v neostandard >package.json 
  fi

Tests passes. I think that is a reasonable work around until we can get unrs fixed up. @richardlau the overrides is a good suggestion as well, but I think I'll leave it at the fix in the job as that will avoid having to remove the override later on.

Will leave this issue open so we don't forget to follow up on the fix in unrs-resolver.

@mhdawson
Copy link
Member Author

@mhdawson mhdawson moved this from Need Triage to In Progress in Node-API Team Project Apr 25, 2025
@abmusse
Copy link

abmusse commented May 13, 2025

@abmusse could you take a look at PRing in the case needed for AIX into unrs-resolver?

@mhdawson
This is now on my TODO list and will be making the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

3 participants