Skip to content
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

Failed to update turbo from 2.2.3 to 2.3.3 using @turbo/codemod with Yarn 4.5.3 #9596

Open
1 task done
KuryKat opened this issue Dec 9, 2024 · 1 comment
Open
1 task done
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage

Comments

@KuryKat
Copy link

KuryKat commented Dec 9, 2024

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/KuryKat/TurboCodemodYarnFour

Which canary version will you have in your reproduction?

2.3.4-canary.2

Enviroment information

D:\repos\Bugs\TurboCodemodYarnFour>npx turbo info 
turbo 2.3.4-canary.2

CLI:
   Version: 2.3.4-canary.2
   Path to executable: D:\repos\Bugs\TurboCodemodYarnFour\node_modules\turbo-windows-64\bin\turbo.exe
   Daemon status: Not running
   Package manager: berry

Platform:
   Architecture: x86_64
   Operating system: windows
   WSL: false
   Available memory (MB): 2845
   Available CPU cores: 4

Environment:
   CI: None
   Terminal (TERM): unknown
   Terminal program (TERM_PROGRAM): vscode
   Terminal program version (TERM_PROGRAM_VERSION): 1.95.3
   Shell (SHELL): unknown
   stdin: false


D:\repos\Bugs\TurboCodemodYarnFour>

Expected behavior

I expected Turbo to update itself to the latest release, without errors.

Actual behavior

Trying to update using Yarn 4+ causes an error because it tries to use a flag (-W) that doesn't seem to exist in Yarn 4+

To Reproduce

  • Use turbo with yarn
  • Set Yarn version to 4+
  • Try to update turbo using the codemod package
  • Error happens

Additional context

Below is the output from the console commands:

Microsoft Windows [Version 10.0.19045.5131]
(c) Microsoft Corporation. All rights reserved.

D:\repos\Bugs\TurboCodemodYarnFour>npx create-turbo@canary -e with-shell-commands 
? Where would you like to create your Turborepo? .
? Which package manager do you want to use? yarn

>>> Creating a new Turborepo with:

Application packages
 - apps\app-a: An application that uses other Internal Packages
rds.                                                                                                                     rds.
Library packages
 - packages\pkg-a
 - packages\pkg-b
 - packages\tooling-config: A package used by every other package.

>>> Success! Your new Turborepo is ready.

To get started:
- Enable Remote Caching (recommended): npx turbo login
   - Learn more: https://turbo.build/repo/remote-cache

- Run commands with Turborepo:
- Run a command twice to hit cache

D:\repos\Bugs\TurboCodemodYarnFour>yarn set version 4.5.3
(node:18780) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
➤ YN0000: You don't seem to have Corepack enabled; we'll have to rely on yarnPath instead
➤ YN0000: Downloading https://repo.yarnpkg.com/4.5.3/packages/yarnpkg-cli/bin/yarn.js
➤ YN0000: Saving the new release in .yarn/releases/yarn-4.5.3.cjs
➤ YN0000: Done with warnings in 0s 696ms

D:\repos\Bugs\TurboCodemodYarnFour>npx @turbo/codemod@canary update
? Where is the root of the repo to migrate? .
No codemods required to migrate from 2.3.4-canary.2 to 2.3.3 

Upgrading turbo from 2.3.4-canary.2 to 2.3.3 (no codemods required) 

Upgrading turbo with yarn add turbo@latest --dev -W 

Migration failed
Unable to upgrade turbo: Error: Command failed: yarn add turbo@latest --dev -W

D:\repos\Bugs\TurboCodemodYarnFour>yarn add turbo@latest --dev -W 
Unknown Syntax Error: Command not found; did you mean one of:

  0. yarn add [--json] [-F,--fixed] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [-O,--optional] [--prefer-dev] [-i,--interactive] [--cached] [--mode #0] ...
  1. yarn add [--json] [-F,--fixed] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [-O,--optional] [--prefer-dev] [-i,--interactive] [--cached] [--mode #0] ...

While running add turbo@latest --dev -W

D:\repos\Bugs\TurboCodemodYarnFour>
@KuryKat KuryKat added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Dec 9, 2024
@KuryKat
Copy link
Author

KuryKat commented Dec 9, 2024

I tried looking everywhere for a issue that was already open, but couldn't find, I apologize in advance if there is already an issue open for this matter 🙏✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage
Projects
None yet
Development

No branches or pull requests

1 participant