-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[turborepo] Turbo error: unable to find any locator for string_decoder@0.1 #6232
Comments
Could you provide your lockfile? (Either here or privately share a copy with me via a private repository) If you're unable to, then providing the entry in |
Here you go:
Full file: yarn.lock I wonder if it's something as simple as Turbo parsing the |
It seems this is an underlying issue with our YAML parsing library: dtolnay/serde-yaml#165 (comment) Continuing to look into either an upstream fix or a workaround |
### Description Fixes #6232 This PR allows us to properly deserialize semver versions from YAML in `yarn.lock`. Previously we would fail at parsing ranges with trailing zeros e.g. `(0.10f32).to_string() == "0.1"`. The approach taken in this PR is due to some outstanding quirks in `serde_yaml`: - dtolnay/serde-yaml#165 (comment) - dtolnay/serde-yaml#388 Our usage of `#[serde(flatten)]` in `LockfileData` caused attempting to parse `2` or `0.10` as a `String` to fail. To avoid this we first parse the document as a map with a union of the metadata/package entries and then convert this to the expected structure. This provides us the type safety of the old implementation, but at the cost of rebuilding the map. As a minor thing, I removed all unused `Serialize`/`Deserialize` implementations to make it clear which codepaths actually get used. ### Testing Instructions Existing unit tests pass. I changed out the old unit tests for `SemverString` to be captured by the new `berry_semver.lock` test fixture which covers the same cases. We do this because even if parsing versions works when invoked directly, adding `#[serde(flatten)]`/`#[serde(untagged)]` to any containing structure changes the behavior. Closes TURBO-1540 --------- Co-authored-by: Chris Olszewski <Chris Olszewski>
What version of Turborepo are you using?
1.10.16
What package manager are you using / does the bug impact?
Yarn v2/v3 (node_modules linker only)
What operating system are you using?
Mac
Describe the Bug
Running
yarn turbo prune
on one of my projects in a monorepo results in some (all?) files being produced inout
but the command fails with:Turbo error: unable to find any locator for string_decoder@0.1
Running
yarn why string_decoder@0.1
comes back with nothing andyarn why string_decoder
shows a lot of different versions none of which are 0.1I have removed
node_modules
andyarn.lock
and reinstalled and still get the same issue. Yarn itself never complains and my builds all work.Expected Behavior
The command should work
To Reproduce
I'm unable to find how to reproduce this as filtering by another scope in my monorepo works fine. This seems to be related to a particular scope.
Reproduction Repo
No response
The text was updated successfully, but these errors were encountered: