Running a turbo upgrade fails when running it twice #8495
Labels
kind: bug
Something isn't working
needs: triage
New issues get this label. Remove it after triage
owned-by: turborepo
Verify canary release
Link to code that reproduces this issue
na
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
na
Describe the Bug
While upgrading turborepo with
npx @turbo/codemod@latest update
I ran into the following error:Error message:
Expected Behavior
Does not error and completes the migration successfully after running a second time.
To Reproduce
Migrating turbo repo from
1.13.3
to latest withnpx @turbo/codemod@latest update
. I was also updating eslint versions and some internal packages' (eslint config and typescript config) names and didn't replace all references in my apps that referenced them. Not ideal but it happened this way. Runningnpx @turbo/codemod@latest update
the first time resulted in what seemed like a successfull migration:Until it got to the last part there of upgrading turbo with pnpm. And since package references were wrong pnpm failed, thus migration failed.
I fixed the references, ran pnpm install in the root to make sure, and reran
npx @turbo/codemod@latest update
and got the error noted in Describe the BugSince the migrations succeed the first time I manually updated the package.json turbo version to
"^2.0.3"
and pnpm installed. And everything seemed to work ok.A rare edge case but still reporting nonetheless.
Additional context
The text was updated successfully, but these errors were encountered: