Current Behavior
The native findImports() (of nx-darwin-arm64 in my case) seems to include .gitignore-files outside of the repository from the parent folder when determining which files to exclude from the dependency computation. This can lead to incorrect project-dependencies and failing builds.
Expected Behavior
Only .gitignore-files within the current repository are taken into account and, of course, applied downstream.
GitHub Repo
https://github.com/rene-leanix/nx-20.2.2-dependency-bug
Steps to Reproduce
- Add a
.gitignore file with the line classes to the parent folder of the example repository.
- Executing
npm run build now fails.
- Executing
npm run graph does not show any more that lib1 depends on lib2.
Nx Report
Node : 18.19.1
OS : darwin-arm64
Native Target : aarch64-macos
npm : 10.2.4
nx : 20.2.2
@nx/js : 20.2.2
@nx/jest : 20.2.2
@nx/eslint : 20.2.2
@nx/workspace : 20.2.2
@nx/angular : 20.2.2
@nx/devkit : 20.2.2
@nx/module-federation : 20.2.2
@nx/plugin : 20.2.2
@nx/web : 20.2.2
@nx/webpack : 20.2.2
typescript : 5.6.3
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
No response
Current Behavior
The native findImports() (of
nx-darwin-arm64in my case) seems to include.gitignore-files outside of the repository from the parent folder when determining which files to exclude from the dependency computation. This can lead to incorrect project-dependencies and failing builds.Expected Behavior
Only
.gitignore-files within the current repository are taken into account and, of course, applied downstream.GitHub Repo
https://github.com/rene-leanix/nx-20.2.2-dependency-bug
Steps to Reproduce
.gitignorefile with the lineclassesto the parent folder of the example repository.npm run buildnow fails.npm run graphdoes not show any more that lib1 depends on lib2.Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
No response