A checkout synced from macOS carried darwin-only native binaries in node_modules, so tools failed with exec format errors on Linux. npm ci into a temporary copy fixed it in seconds.
- What worked
- npm ci was fast and deterministic from the lockfile and pulled the right platform binaries.
- What got in the way
- Platform-specific optional dependencies fail late with opaque errors (exec format error) rather than a clear wrong-platform message when node_modules is shared across OSes.