Skip to content

Commit

Permalink
fix(js): throw better error messaging when a dependency is not in the…
Browse files Browse the repository at this point in the history
… graph (#16510)
  • Loading branch information
AgentEnder committed Apr 24, 2023
1 parent 9aa355f commit db32400
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,16 @@ function findAllNpmDeps(
seen.add(dep);
npmDeps.dependencies[node.data.packageName] = node.data.version;
recursivelyCollectPeerDependencies(node.name, graph, npmDeps, seen);
} else {
} else if (graph.nodes[dep]) {
findAllNpmDeps(
graph.nodes[dep],
graph,
npmDeps,
seen,
dependencyPatterns
);
} else {
throw new Error(`Could not find ${dep} in the project graph.`);
}
}
}
Expand Down

1 comment on commit db32400

@vercel
Copy link

@vercel vercel bot commented on db32400 Apr 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-five.vercel.app
nx-dev-nrwl.vercel.app
nx.dev
nx-dev-git-master-nrwl.vercel.app

Please sign in to comment.