Skip to content
Latchkey

Nx "Unable to resolve executor" in project.json - Fix in CI

A target’s executor in project.json points at a plugin that Nx cannot load - the plugin package is not installed, the executor name is wrong, or the install was pruned in CI.

What this error means

Running a target fails with "Unable to resolve <pkg>:<executor>" or "Cannot find module". The project and target exist, but Nx cannot load the code that runs the task. Deterministic for the given install.

Nx output
 NX   Unable to resolve @nx/webpack:webpack.

 Cannot find module '@nx/webpack'
 Require stack: ...

Common causes

Executor plugin not installed

The target references @nx/webpack:webpack (or similar) but the plugin package is missing from node_modules - not a dependency, or omitted by a production-only install in CI.

Wrong executor identifier

A typo in the package:executor string, or a renamed executor after a plugin upgrade, fails to resolve even when the plugin is present.

Version skew between Nx and the plugin

A plugin version incompatible with the installed Nx core may not expose the executor Nx expects.

How to fix it

Install the plugin that provides the executor

Add the plugin as a dependency so its executor resolves at runtime.

Terminal
npm install -D @nx/webpack
# confirm it resolves
node -e "require.resolve('@nx/webpack')"

Correct the executor reference

Use the exact package:executor identifier the plugin exposes.

project.json
{
  "targets": {
    "build": { "executor": "@nx/webpack:webpack", "options": {} }
  }
}

Keep Nx and plugins on matching versions

  1. Align plugin versions with the Nx core version (they release together).
  2. Avoid --omit=dev installs that drop build-time plugins in CI.
  3. Run nx run <project>:<target> --verbose to see the resolution stack.

How to prevent it

  • Declare every executor plugin as a dependency, not an implicit one.
  • Install dev dependencies in CI when targets need build-time plugins.
  • Upgrade Nx core and its plugins together to avoid executor drift.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →