From 90a6e744910ce6c6bfd5b3f9a4737585d0e6b48a Mon Sep 17 00:00:00 2001 From: Miroslav Jonas Date: Wed, 19 Apr 2023 10:20:37 +0200 Subject: [PATCH] fix(core): do not expect each package to have hoisted version in lockfile --- packages/nx/src/plugins/js/lock-file/project-graph-pruning.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/nx/src/plugins/js/lock-file/project-graph-pruning.ts b/packages/nx/src/plugins/js/lock-file/project-graph-pruning.ts index 97c957b4a1578..4609cdfbcb209 100644 --- a/packages/nx/src/plugins/js/lock-file/project-graph-pruning.ts +++ b/packages/nx/src/plugins/js/lock-file/project-graph-pruning.ts @@ -85,6 +85,7 @@ function findNodeMatchingVersion( return nodes.sort((a, b) => +gte(b.data.version, a.data.version))[0]; } if ( + graph.externalNodes[`npm:${packageName}`] && satisfies( graph.externalNodes[`npm:${packageName}`].data.version, versionExpr