nrwl / nx

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

NX Missing Platform Dependency - WSL Ubuntu 22.04 #23063

Open g1hanna opened 3 months ago

g1hanna commented 3 months ago

Current Behavior

Console is throwing the following error when I run an NX command to install packages or run targets:

➜ nx add @nx/plugin

[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/troubleshooting/troubleshoot-nx-install-issues

Additionally, I can confirm that the @nx/nx-<platform-architecture> is properly installed and that Node.js is configured and running properly. image

Expected Behavior

Unless there is a limitation to running Nx on a WSL container, Nx commands should run as expected.

GitHub Repo

No response

Steps to Reproduce

  1. Create a WSL machine with the Ubuntu-22.04 tag
  2. Install Node version 18.X.X using nvm nvm install v18
  3. Install latest version of Nx or run npx create-nx-workspace
  4. cd into the workspace and run the nx add @nx/plugin command

Nx Report

➜  nx report

 NX   Report complete - copy this into the issue template

Node   : 18.20.2
OS     : linux-x64
npm    : 10.5.0

nx (global)    : 18.3.3
nx             : 18.3.4
@nx/js         : 18.3.4
@nx/workspace  : 18.3.4
@nx/devkit     : 18.3.4
@nrwl/tao      : 18.3.4

Failure Logs

➜  nx add @nx/plugin

 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/troubleshooting/troubleshoot-nx-install-issues

Package Manager Version

10.5.0

Operating System

Additional Information

Running on an Ubuntu container with the latest version of WSL (Windows 11)

neelfinance commented 2 months ago

Any updates on this ?

dw-0 commented 2 months ago

I encountered the same issue, in my case it was nx migrate i was trying to run. I could work around that issue by running npx nx migrate instead.

BenRacicot commented 2 months ago

Can confirm this issue. Adding that its a fresh install after removing Nx entirely. (no migration)

cytex-ch commented 2 months ago

I can confirm the issue as well.