Skip to content

Commit

Permalink
fix(core): do not expect each package to have hoisted version (#15229)
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Feb 24, 2023
1 parent bf7ae6d commit 3be23e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/nx/src/lock-file/npm-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ function addNodes(
// so we need to run this check once we have all the nodes and paths
for (const [packageName, versionMap] of nodes.entries()) {
const hoistedNode = keyMap.get(`node_modules/${packageName}`);
hoistedNode.name = `npm:${packageName}`;
if (hoistedNode) {
hoistedNode.name = `npm:${packageName}`;
}

versionMap.forEach((node) => {
builder.addExternalNode(node);
Expand Down

1 comment on commit 3be23e0

@vercel
Copy link

@vercel vercel bot commented on 3be23e0 Feb 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx.dev

Please sign in to comment.