Open fveauvy opened 4 months ago
This is not turbo-ignore
, but NPM itself. It can be reproduced by using any package not installed locally via npx
:
[0 olszewski@chriss-mbp] /tmp/turbo-ignore-issue $ npx is-even
npm ERR! code ENOTDIR
npm ERR! syscall open
npm ERR! path /private/tmp/turbo-ignore-issue/apps/README.md/package.json
npm ERR! errno -20
npm ERR! ENOTDIR: not a directory, open '/private/tmp/turbo-ignore-issue/apps/README.md/package.json'
npm ERR! A complete log of this run can be found in: /Users/olszewski/.npm/_logs/2024-07-01T19_57_40_578Z-debug-0.log
I'm unsure of where in the NPM stack this path is getting opened.
Verify canary release
Link to code that reproduces this issue
https://github.com/fveauvy/turbo-ignore-issue
What package manager are you using / does the bug impact?
Yarn v1
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
turbo@2.0.6-canary.0
Describe the Bug
Context
In our project, we have a knowledge root folder where we centralize all project-related documentation. We use symbolic links to reference this documentation in relevant places within the repository.
Example structure:
This method enhances discoverability for newcomers and simplifies documentation maintenance by centralizing all knowledge in one place and distributing it via symlinks to relevant locations.
The issue
Due to our structure (symlinks within one of the workspace folders), we encounter an error when using turbo-ignore.
The command
npx turbo-ignore <app-name>
fails with the following error:It appears that turbo-ignore mistakenly identifies the
README.md
symlink as a directory and attempts to locate a package.json file within it.Expected Behavior
npx turbo-ignore <app-name>
should not throw an error when encountering a symlink to a file within a Yarn workspace folder.To Reproduce
git clone git@github.com:fveauvy/turbo-ignore-issue.git
cd turbo-ignore-issue && yarn install
npx turbo-ignore app-b
Additional context
No response