Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(core): add more descriptive dependencies build error (#9031)
Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
  • Loading branch information
yharaskrik and AgentEnder committed Mar 28, 2022
1 parent 0ad3eb3 commit 70492f3
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 @@ -208,7 +208,15 @@ export function checkDependentProjectsHaveBeenBuilt(
targetName,
projectDependencies
);
if (missing.length > 0) {
if (missing.length === projectDependencies.length && missing.length > 0) {
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 70492f3

Please sign in to comment.