Nx "The externalDependencies ... could not be found" in CI
A target's inputs declares an externalDependencies entry, and Nx could not match the named npm package to any dependency it knows about. The package name is wrong, or it is not declared in a package.json on the graph.
What this error means
Running or hashing a task fails with "The externalDependencies. [name] could not be found" while Nx is computing the task hash.
The externalDependencies. "esbuld" could not be foundCommon causes
The package name in the input is misspelled
The externalDependencies array lists a package (for example esbuld) that is not an actual dependency, so Nx cannot resolve it for hashing.
The dependency is not declared in any package.json
The package is used but never added to a package.json Nx tracks, so it is absent from the dependency set the input refers to.
How to fix it
Correct the externalDependencies entry
- Open the target input that lists
externalDependencies. - Fix the package name to match the real npm dependency.
- Re-run the task so Nx can hash the input.
"inputs": [
"default",
{ "externalDependencies": ["esbuild"] }
]Declare the dependency in package.json
Add the package to the relevant package.json so it exists in the dependency graph the input references.
npm install -D esbuildHow to prevent it
- List only real, installed packages in
externalDependenciesinputs. - Keep
package.jsondependencies in sync with what targets actually use. - Validate inputs after editing target configuration.