Skip to main content

Global installation

Install Nx globally to run commands from anywhere. Choose a method based on your operating system and package manager.
You can also use yarn global add nx, pnpm add --global nx, or bun add --global nx.

Verify installation

You should see a version number like 22.5.0.

Update global installation

You can also use yarn global upgrade nx, pnpm update --global nx, or bun update --global nx.

Install in a repository

To add Nx to an existing repository, run:
This installs the nx package as a dev dependency and creates an nx.json configuration file. If you have Nx installed globally, it will defer to the local version in your repository.
You can also manually install the nx npm package and create an nx.json configuration file by hand.

Update Nx in your repository

When you update Nx in your repository, it will also automatically update your dependencies if you have an Nx plugin installed for that dependency. To update Nx, run:
This creates a migrations.json file with any update scripts that need to be run. Apply them with:
To avoid potential issues, update one major version of Nx at a time.

System requirements

Nx is built with Rust for performance and ships precompiled native binaries for the following platforms: Nx requires Node.js (LTS recommended). No other global dependencies are required — Nx manages tooling per project via plugins.