fix(angular): explicitly depend on find-cache-dir to avoid npm resolution conflict #18049
+5
−3
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.
Current Behavior
A recent version of
babel-loader
(a dependency of@nx/webpack
which is a dependency of@nx/angular
) depends on a version offind-cache-dir
distributed as ESM. This causes theng-packagr
executors to throw because the@nx/angular
package does not depend directly on that package and the package manager can resolve the unexpected version at the root.This was caught by the Nigthly E2E tests: https://github.com/nrwl/nx/actions/runs/5502618546/jobs/10027062285#step:16:195
Expected Behavior
The
ng-packagr
executors work correctly.Note: Doing a dynamic import in this case is not possible because the code using that package needs to be synchronous and using a dynamic import would make it async.
Related Issue(s)
Fixes #