diff --git a/packages/js/src/utils/check-dependencies.ts b/packages/js/src/utils/check-dependencies.ts index 2f71d482f3a4b..6c75352f1ed1e 100644 --- a/packages/js/src/utils/check-dependencies.ts +++ b/packages/js/src/utils/check-dependencies.ts @@ -19,8 +19,7 @@ export function checkDependencies( context.root, context.projectName, context.targetName, - context.configurationName, - true + context.configurationName ); const projectRoot = target.data.root; diff --git a/packages/workspace/src/utilities/buildable-libs-utils.ts b/packages/workspace/src/utilities/buildable-libs-utils.ts index b000104625949..1a3c940b1d984 100644 --- a/packages/workspace/src/utilities/buildable-libs-utils.ts +++ b/packages/workspace/src/utilities/buildable-libs-utils.ts @@ -137,7 +137,8 @@ function collectDependencies( return; acc.push({ name: dependency.target, isTopLevel: areTopLevelDeps }); - if (!shallow) { + const isInternalTarget = projGraph.nodes[dependency.target]; + if (!shallow && isInternalTarget) { collectDependencies(dependency.target, projGraph, acc, shallow, false); } }