Open brianlenz opened 6 days ago
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 /*
instead of /**
works around the issue. Unfortunately, this isn't a viable solution for us, as we have deeply nested projects in the scripts
directory in our monorepo that we need to use Yarn workspaces (thus the **
is a necessity). But hopefully that information is helpful to trace and fix the bug! 🙏
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
prefix = "/opt/homebrew"
; "user" config from /Users/brian/.npmrc
//registry.npmjs.org/:_authToken = (protected)
; node bin location = /opt/homebrew/Cellar/node/22.9.0_1/bin/node ; node version = v22.9.0 ; npm local prefix = /Users/brian ; npm version = 10.9.0 ; cwd = /Users/brian ; HOME = /Users/brian ; Run
npm config ls -l
to show all defaults.