Skip to content

Commit

Permalink
fix(js): do not write cached lockfile parsed results when an error is…
Browse files Browse the repository at this point in the history
… thrown
  • Loading branch information
FrozenPandaz committed Mar 26, 2024
1 parent fa5c99f commit 87becb0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/nx/src/plugins/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ export const createDependencies: CreateDependencies = (
_,
ctx: CreateDependenciesContext
) => {
if (!parsedLockFile.externalNodes) {
throw new Error(
'Could not create dependencies because there was an error creating nodes'
);
}

const pluginConfig = jsPluginConfig(ctx.nxJsonConfiguration);

const packageManager = detectPackageManager(workspaceRoot);
Expand Down

0 comments on commit 87becb0

Please sign in to comment.