Skip to content

Commit

Permalink
fix(core): set it to be error
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Mar 6, 2023
1 parent 91c9f00 commit 9b4c7bb
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/nx/src/lock-file/npm-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,15 +525,12 @@ function nestMappedPackages(
});

if (initialSize === nestedNodes.size) {
output.error({
title: 'An error occured while creating pruned lockfile',
bodyLines: [
'Following packages could not be mapped to the lockfile.',
throw new Error(
[
'Following packages could not be mapped to the NPM lockfile:',
...Array.from(nestedNodes).map((n) => `- ${n.name}`),
'`npm ci` might fail due to missing dependencies in the lockfile. If this happens, please open an issue at `https://github.com/nrwl/nx/issues/new?template=1-bug.yml` and provide a reproduction.',
'You can still install your dependencies using full `npm install` that would override the pruned lockfile.',
],
});
].join('\n')
);
} else {
nestMappedPackages(
invertedGraph,
Expand Down

0 comments on commit 9b4c7bb

Please sign in to comment.