Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All symlinked files are ignored #4815

Open
dr3 opened this issue Oct 8, 2024 · 3 comments
Open

All symlinked files are ignored #4815

dr3 opened this issue Oct 8, 2024 · 3 comments
Assignees

Comments

@dr3
Copy link

dr3 commented Oct 8, 2024

Issue

All files that are symlinked are ignored by relay-compiler.

This includes files found via src in single project repos and generatedSources in multi project repos

This means that while its common to exclude "**/node_modules/**", if you dont want to, and use pnpm (which uses symlinks) its impossible for relay to discover your files

Expected behaviour

Either by default, or via a flag, relay compiler sees and resolves symlinked files as if they were standard files

@lynnshaoyu lynnshaoyu self-assigned this Oct 8, 2024
@lynnshaoyu
Copy link
Contributor

Hey @dr3 did you just notice this behavior starting recently or has it been persisting for a long time?

@dr3
Copy link
Author

dr3 commented Oct 8, 2024

Hey @dr3 did you just notice this behavior starting recently or has it been persisting for a long time?

@lynnshaoyu Ive tested on 14.1.0 and 18.1.0 and it happens on both

Im testing via referencing a fragment in a node_module by name and getting Undefined fragment ... error

Then running this is to replace symlinks with actual files

cp -Lr node_modules/@component-library/apple node_modules/@component-library/appleCopy && rm node_modules/@component-library/apple && mv node_modules/@component-library/appleCopy node_modules/@component-library/apple

And the error disappears

@net
Copy link

net commented Oct 10, 2024

Does node-linker=hoisted fix the problem?

https://pnpm.io/npmrc#node-linker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants