Skip to content

Commit

Permalink
fix(core): nx should not break if packages were not installed (#18687)
Browse files Browse the repository at this point in the history
(cherry picked from commit 20acfbe)
  • Loading branch information
meeroslav authored and FrozenPandaz committed Aug 18, 2023
1 parent 1857e8f commit 95099ae
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/nx/src/plugins/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,15 @@ export const processProjectGraph: ProjectGraphProcessor = async (
let parsedLockFile: ProjectGraph;
if (lockFileNeedsReprocessing(lockHash)) {
parsedLockFile = parseLockFile();
writeLastProcessedLockfileHash(lockHash, parsedLockFile);
if (parsedLockFile) {
writeLastProcessedLockfileHash(lockHash, parsedLockFile);
}
} else {
parsedLockFile = readParsedLockFile();
}
builder.mergeProjectGraph(parsedLockFile);
if (parsedLockFile) {
builder.mergeProjectGraph(parsedLockFile);
}
}
}

Expand Down

0 comments on commit 95099ae

Please sign in to comment.