Running Nx?

Nx task graph not matching your monorepo? We unstick it.

Nx can carry a very large monorepo if the project graph, the plugin versions and the affected commands all agree with each other. When one of those three drifts, the whole thing starts producing results you cannot trust. We bring them back into alignment.

  • Since 2015Fixing technology
  • FreeEstimates
  • US teamReal engineers

nx-run.log

still broken

What it is

Nx at a glance

Nx is a smart monorepo build system from Nrwl, first released in 2017 as a set of Angular schematics and now a general purpose tool across React, Node, Angular, Vue, Next.js and more. It treats the workspace as a project graph and offers caching, affected commands, code generators and a plugin system on top.

Nx Cloud, the paid remote cache and distributed task execution service, sits alongside the open source core. Many teams buy Nx for the plugin ecosystem and the generators, and the cache turns out to be the piece that pays for itself first.

Type
Monorepo build system and plugin platform
First released
2017
License
MIT core, Nx Cloud is a paid SaaS add on
Maintained by
Nx, formerly Nrwl
Typically used for
Angular, React and Node monorepos, code generation, task caching, distributed CI

The honest version

Nx pros and cons

No technology is all upside. This is where Nx earns its place and where it tends to cause trouble.

Where Nx is strong

  • Project graph is first classNx reads implicit and explicit dependencies between projects and uses that graph for affected commands, task scheduling and cache invalidation.
  • Rich plugin ecosystemOfficial plugins cover Angular, React, Next.js, Node, NestJS, Vue, Expo, Storybook and more, each with executors, generators and migrations.
  • Code generators that move with the toolnx generate scaffolds a new library or application with sensible defaults and keeps pace with upstream framework changes, which is useful on long lived codebases.
  • Affected commands save CI timenx affected runs only the tasks whose inputs changed since the base branch, which turns a monorepo CI run into something scoped and reasonable.
  • Distributed task execution with Nx CloudLarge pipelines can be sharded automatically across agents, which brings test and build times down more than caching alone.
  • Migrations handled through the CLInx migrate reads the installed plugin versions and generates a migration file, which makes framework upgrades repeatable rather than a weekend job.

Where Nx bites

  • Version drift between Nx and its plugins bitesEach plugin has to match the Nx major version, and a mismatched @nx/react or @nx/webpack produces confusing errors rather than a clean refusal to run.
  • The CLI surface is largeExecutors, generators, targets, inputs, named inputs, projectNameAndRootFormat and more each have their own flags, and a small team can struggle to keep them all in their head.
  • project.json versus package.json ambiguityTwo valid places to configure a target means teams end up with half the workspace in one style and half in the other, which makes audits harder than they should be.
  • Nx Cloud lock in for the best piecesRemote cache and distributed task execution are only meaningful with Nx Cloud, so teams that avoid SaaS lose the features that justify the complexity.
  • Upgrades can be longA major Nx release often brings schema changes, executor renames and plugin upgrades that cannot be skipped, so staying current takes planned effort.
  • Task graph bugs are hard to diagnoseA project that is missing from affected or appears in the graph when it should not usually traces to a subtle implicitDependencies or namedInputs issue.

Sound familiar?

Common Nx problems we fix

The Nx problems that bring people to us, and what you have once each one is fixed.

Cannot find project 'web' in the workspace

Project graph is missing a package

A move or rename left the workspace index stale, or an implicitDependencies list points at a project that was renamed. Rebuilding the graph without the cache usually shows the real cause.

Graph back in sync with the repo

Circular dependency between 'ui' and 'shared'

Cycles in the project graph

A convenience import across libraries that should have gone one way only. Nx refuses to build until the cycle is broken, which is almost always the right call.

Boundaries clean, one way imports

@nx/react plugin version does not match

Plugin versions have drifted

A partial upgrade left @nx/workspace on one version and @nx/react on another. Running nx migrate against the pinned version usually realigns them.

Plugin versions aligned

executor @nx/webpack:webpack could not be found

Executor path has changed

A plugin renamed its executor between major versions and the project.json still points at the old one. The migration script either missed it or was skipped.

Executors pointing at live code

nx affected: no files changed, running 0 tasks

Affected commands are finding nothing

The base reference is wrong, or namedInputs excludes the files that actually changed. CI runs look green but have run no real tasks.

Affected scope matches reality

Nx Cloud access token missing

Remote cache is quietly off

The token exists locally but not in CI, so every CI run misses the shared cache and the pipeline runs long without anyone noticing.

Cache available on every run

12 pending migrations detected

Workspace is multiple versions behind

Migrations have been deferred and now overlap, which is a slower upgrade than taking them one at a time. We rehearse the full chain on a copy first.

Workspace on a supported version

Daemon process terminated unexpectedly

The Nx daemon keeps dying

File watcher limits, antivirus interference or a corrupted .nx/cache folder. We flush the cache, confirm the fs limits, and rule out the environment causes before touching config.

Daemon stable, runs fast again

What we do

Nx help, from graph fixes to upgrades

Call us for a broken affected command, or hand us the whole workspace strategy.

Rescue
Project graphs that refuse to resolve, plugins that disagree on their version, or affected commands missing real changes. We stabilise and then explain.
Upgrades and migrations
nx migrate rehearsed on a copy of the workspace, pending migrations applied in the right order, and the pipeline verified against the target version before the real run.
Project graph audits
Implicit dependencies, named inputs, boundaries and tags reviewed so the graph reflects what your teams actually depend on.
Nx Cloud setup
Remote cache and distributed task execution wired up with tokens visible in both local and CI environments, and verification that the hit rate is real.
Custom plugins and generators
Workspace specific plugins that codify how your team builds a new library, service or app, so new work follows the same standards without a wiki.
Managed Tech
Regular migration passes, cache and pipeline health reviews, and a number to call when a weekend plugin update takes the daemon down.

How it works

From first message to fixed

  1. Look Free estimate

    Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.

  2. Fix

    We fix the cause, not the symptom. If something is down, getting it back up comes first.

  3. Harden

    Backups, monitoring, updates and access, so the same problem can't quietly come back.

  4. Hand back or stay on

    You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.

Often found together

Running Nx alongside something else?

We work on the whole stack, so the problem can be wherever it actually is.

Questions

Nx questions

Something else? Call+1 737 727 7327

Should we pick Nx or Turborepo for our monorepo?

Nx carries a larger workspace and a wider range of frameworks, especially Angular and Node service code. Turborepo has a smaller configuration surface and is easier to adopt incrementally for a pure JS or TS repo. We look at what your team already knows, what plugins you would use, and how much value Nx Cloud would add before suggesting one.

Why does nx affected sometimes miss changes?

Usually the base reference is wrong, so Nx is comparing against the wrong commit. Sometimes namedInputs excludes files that genuinely do change the build. The nx graph and nx show commands print the exact dependencies Nx believes in, and the mismatch is usually visible there.

How painful is an Nx major upgrade?

It depends on how many majors you have skipped. One major with a handful of pending migrations is usually a half day of work. Four majors deep with custom executors is a project of its own. We rehearse the whole chain on a copy of the workspace before touching main.

Do we need Nx Cloud to get value from Nx?

Not strictly. Local caching, affected commands and generators work without it. But remote cache and distributed task execution are only available through Nx Cloud, and those are the features that make large monorepo CI tolerable. Teams without them often conclude Nx is not worth the overhead.

Can you help us migrate from Lerna or a custom tool to Nx?

Yes. We add Nx alongside what you have, bring one project under the new configuration, confirm cache and affected behaviour, and then move the rest in small batches. The original scripts keep running throughout so nothing stops.

How much does Nx help cost?

Estimates are at no charge. Share your nx.json, a recent run, and a short note about what is slow or broken, and we send a price and a plan before starting.

Free estimate

Nx not pulling its weight?

Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.

  • No charge to find out what it will take
  • If it's urgent, say so

Replies come from a person. By sending, you authorize us to email you back. No marketing.