-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
What version of Turborepo are you using?
1.6.4 (but tested with 1.7.2)
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Mac
Describe the Bug
Hi,
When pruning I got this error:
Run turbo prune --scope=docs
ERROR could not construct graph: 4 errors occurred:
* Unable to find resolved version for @codegouvfr/react-dsfr@0.24.0 in apps/docs
Turbo error: could not construct graph: 4 errors occurred:
* Unable to find resolved version for @codegouvfr/react-dsfr@0.24.0 in packages/ui
* Unable to find resolved version for react-dom@[18](https://github.com/inclusion-numerique/mediature/actions/runs/4111581811/jobs/7095492150#step:8:19).2 in packages/eslint-config-custom
* Unable to find resolved version for typescript@^4.9.3 in apps/main
* Unable to find resolved version for @codegouvfr/react-dsfr@0.24.0 in apps/docs
* Unable to find resolved version for @codegouvfr/react-dsfr@0.24.0 in packages/ui
* Unable to find resolved version for react-dom@18.2 in packages/eslint-config-custom
* Unable to find resolved version for typescript@^4.9.3 in apps/main
I have to admit it was a bit weird because I didn't not change anything in my global package.json (pnpm) and it breaks, then after retrying previous commit it was no longer working :/ ... I tried to remove caches because I found it was hard to explain but impossible to make things working again.
After giving multiple attempts, it was not due to the turbo
version. But it's probably something between pnpm
and turbo
.
In my main package.json
I do have a section .pnpm.overrides
(https://github.com/inclusion-numerique/mediature/blob/04e9585a14626873be04aced9469fcb0a7bfad28/package.json#L33-L73) to make sure I have shared dependencies between all my monorepo packages (to avoid building my packages with multiple React versions...).
In a sense, they seem not conflicting because it worked at any time (except at a moment with the turbo pruning), but to fix this I had to align specifically each package to use the exact same version range.
Since the monorepo has multiple package.json
it's hard to explain describe by text, but here you can find the fix I had to do:
inclusion-numerique/mediature@b6071bd
(if you browse the package.json
files you can see it's to align version ranges)
Didn't see this error on the repo so I posted for record, but if you think it's just on my end, you can close.
Expected Behavior
So it works
To Reproduce
https://github.com/inclusion-numerique/mediature/tree/04e9585a14626873be04aced9469fcb0a7bfad28
Reproduction Repo
No response