-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(nextjs): handle buildable libs correctly (#15795)
(cherry picked from commit 63cdddf)
- Loading branch information
1 parent
53ba54f
commit 7c4f043
Showing
3 changed files
with
25 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +0,0 @@ | ||
import { | ||
DependentBuildableProjectNode, | ||
findMissingBuildDependencies, | ||
} from '@nrwl/workspace/src/utilities/buildable-libs-utils'; | ||
import * as chalk from 'chalk'; | ||
import { ExecutorContext, stripIndents } from '@nrwl/devkit'; | ||
|
||
export function assertDependentProjectsHaveBeenBuilt( | ||
dependencies: DependentBuildableProjectNode[], | ||
context: ExecutorContext | ||
) { | ||
const missing = findMissingBuildDependencies( | ||
context.root, | ||
context.projectName, | ||
context.targetName, | ||
dependencies | ||
); | ||
if (missing.length > 0) { | ||
throw new Error( | ||
chalk.red(stripIndents` | ||
Some of the project ${ | ||
context.projectName | ||
}'s dependencies have not been built yet. | ||
Please build these libraries first: | ||
${missing.map((x) => ` - ${x.node.name}`).join('\n')} | ||
`) | ||
); | ||
} | ||
} | ||