Skip to content

Commit

Permalink
fix(core): add more descriptive dependencies build error
Browse files Browse the repository at this point in the history
  • Loading branch information
yharaskrik committed Feb 18, 2022
1 parent f8c614d commit 61cad9c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/workspace/src/utilities/buildable-libs-utils.ts
Expand Up @@ -195,7 +195,15 @@ export function checkDependentProjectsHaveBeenBuilt(
targetName,
projectDependencies
);
if (missing.length > 0) {
if (missing.length === projectDependencies.length) {
console.error(stripIndents`
It looks like all of ${projectName}'s dependencies have not been built yet:
${missing.map((x) => ` - ${x.node.name}`).join('\n')}
You might be missing a "targetDependencies" configuration in your root nx.json (https://nx.dev/configuration/packagejson#target-dependencies),
or "dependsOn" configured in ${projectName}'s angular.json/workspace.json record or project.json (https://nx.dev/configuration/packagejson#dependson)
`);
} else if (missing.length > 0) {
console.error(stripIndents`
Some of the project ${projectName}'s dependencies have not been built yet. Please build these libraries before:
${missing.map((x) => ` - ${x.node.name}`).join('\n')}
Expand Down

0 comments on commit 61cad9c

Please sign in to comment.