I'm trying to run the build of my Angular project using NX in the CI with GitHub Actions, but it fails with errors such as:
npm ERR! code 1
npm ERR! path /runner/_work/myapp/node_modules/nx
npm ERR! command failed npm ERR! command sh -c node ./bin/post-install
npm ERR! /runner/_womyapp/node_modules/nx/src/native/index.js:244
npm ERR! throw loadError
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module '@nx/nx-linux-x64-gnu'
NX Missing Platform Dependency
The Nx CLI could not find or load the native binary for your supported platform (linux-x64). This likely means that optional dependencies were not installed correctly, or your system is missing some system dependencies. For more information please see https://nx.dev/recipes/troubleshooting/troubleshoot-nx-install-issues
Error: Process completed with exit code 1.
npm install
locally on my windows machine, fixingpackage-lock.json
to@nx/nx-win32-x64-msvc
, so laternpm ci
on the GitLab Linux agent installed that instead of the required@nx/nx-linux-x64-gnu
. Seems thatpackage-lock.json
is inherently unportable? – Pori{}
button) instead of a quote block ("
button). – Alroi