Revert "fix(core): nx should not break if packages were not installed… #18784
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… (#18687)"
This reverts commit 20acfbe.
Current Behavior
There is an issue for
pnpm
users where the project graph being calculated withoutnode_modules
appears to be successful even though the results differ from the project graph which would be calculated whennode_modules
are not present. Thenpm
nodes are basically not added to the graph and the dependencies are drawn anyways.import 'dotenv/config'
), the file is deemed to have a dependency tonpm:dotenv/config
when it should actually depend onnpm:dotenv
.Expected Behavior
There needs to be another solution for this. If the correct graph cannot be produced without
node_modules
then the creation should fail. If we want the project graph to succeed withoutnode_modules
then we need to produce the right project graph without thenode_modules
.This command should produce the same correct dependencies:
Related Issue(s)
Fixes #