-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[BUG] Yarn workspaces w/ Symlinks Breaks npx Invocations #7834
Comments
in your workspace definition of package.json "workspaces": [
"scripts/*", // instead of **, could you try with *
"testsymlinkproj"
]
|
@milaninfy sorry for the delay! Yes, it appears that changing that workspace config to |
I don't think it's a bug yet 😄 |
@milaninfy the configuration works perfectly from a Yarn workspaces standpoint, so I don't think that's the issue at all. Why is Please check out this repo that reproduces the issue, and you can see how simple the use case is: https://github.com/brianlenz/rncli-symlink-bug Based on the stack trace, it looks like it's probably a bug in https://github.com/npm/map-workspaces. One way to address this is here: https://github.com/npm/map-workspaces/blob/main/lib/index.js#L137 - if (err.code === 'ENOENT') {
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') { This solves the problem. Is there anything problematic about this approach? |
I went ahead and opened a PR here for further consideration / discussion 🙏 |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
I've had issues invoking a couple of different commands due to the existence of symbolic links in our monorepo using Yarn workspaces. Specifically, I've gotten the error with
npx @react-native-vector-icons/codemod
andnpx @react-native-community/cli config
.I had originally thought it was a bug in
@react-native-community/cli
and filed a bug there, but then I had the same issue with@react-native-vector-icons/codemod
and realized it might be annpx
bug, which is why I'm reporting the issue here now.Expected Behavior
The existence of symbolic links in a monorepo should not break
npx
commands.Steps To Reproduce
npx @react-native-community/cli config
in the root of the repo or intestsymlinkproj
.or
The log detail:
Environment
10.9.0
22.9.0
The text was updated successfully, but these errors were encountered: