nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.23k stars 2.31k forks source link

Nx postinstall script fails on ARM/v7 #20771

Closed MauriceNino closed 1 month ago

MauriceNino commented 9 months ago

Current Behavior

During yarn installation of dependencies, the postinstall script fails (the error can be seen below in the Failure Logs part).

Expected Behavior

The postinstall script should run through.

GitHub Repo

https://github.com/MauriceNino/dashdot/tree/dev

Steps to Reproduce

  1. Checkout my repository
  2. Switch to this commit on dev branch: 156ec72ab81780a2a913b0c36bedd763cbebefd5
  3. Build a project for ARM/v7 (docker buildx build --platform linux/arm/v7 -t dashdot_arm7 --load .)

Nx Report

   Node   : 19.0.0
   OS     : linux-x64
   yarn   : 3.6.3

   nx                 : 17.2.4
   @nx/js             : 17.2.4
   @nx/jest           : 17.2.4
   @nx/linter         : 17.2.4
   @nx/eslint         : 17.2.4
   @nx/workspace      : 17.2.4
   @nx/cypress        : 17.2.4
   @nx/devkit         : 17.2.4
   @nx/esbuild        : 17.2.4
   @nx/eslint-plugin  : 17.2.4
   @nx/express        : 17.2.4
   @nx/node           : 17.2.4
   @nx/react          : 17.2.4
   @nrwl/tao          : 17.2.4
   @nx/vite           : 17.2.4
   @nx/web            : 17.2.4
   @nx/webpack        : 17.2.4
   typescript         : 5.2.2
   ---------------------------------------
   Community plugins:
   @nx-plus/docusaurus : 15.0.0-rc.0

Failure Logs

> docker run --rm -t dashdot_arm7 sh -c "cat /tmp/xfs-075c4ce6/build.log"

WARNING: The requested image's platform (linux/arm/v7) does not match the detected host platform (linux/amd64) and no specific platform was requested
# This file contains the result of Yarn building a package (nx@virtual:9626f0aa89f3da654a04b89d0c74217e422de0288db8a949c5ccc071efc3d301a471b2a48871c967627e896661c78783f3e03ede8fa88e8aba786c5ddbca590f#npm:17.2.4)
# Script name: postinstall

/app/node_modules/nx/src/native/index.js:244
    throw loadError
    ^

Error: Error loading shared library ld-linux-armhf.so.3: No such file or directory (needed by /app/node_modules/@nx/nx-linux-arm-gnueabihf/nx.linux-arm-gnueabihf.node)
    at Module._extensions..node (node:internal/modules/cjs/loader:1452:18)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)
    at Module.require (node:internal/modules/cjs/loader:1225:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/app/node_modules/nx/src/native/index.js:228:29)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12) {
  code: 'ERR_DLOPEN_FAILED'
}

Node.js v18.19.0

Package Manager Version

No response

Operating System

Additional Information

Running in WSL, but the error is the same in CI (linux): https://github.com/MauriceNino/dashdot/actions/runs/7211854564/job/19648231329

Cammisuli commented 7 months ago

Can you double check that the required file is in node_modules/@nx/nx-linux-arm-gnueabihf? It seems weird that its saying the file is missing.

FrozenPandaz commented 1 month ago

This was fixed with #22870. :tada:

github-actions[bot] commented 3 weeks ago

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.