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

[Bug?]: corepack enable does nothing on fresh clone (yarn stays on v1.x) #10899

Open
1 task
JoshuaKGoldberg opened this issue Jul 1, 2024 · 1 comment
Open
1 task
Assignees
Labels
bug/needs-info More information is needed for reproduction topic/ops-&-contributing-dx

Comments

@JoshuaKGoldberg
Copy link
Contributor

JoshuaKGoldberg commented Jul 1, 2024

What's not working?

I tried setting up a new repo locally and on github.dev on a pairing session with @Tobbe today. I went through the instructions in CONTRIBUTING.md:

redwood/CONTRIBUTING.md

Lines 58 to 61 in a685bd4

git clone https://github.com/your-username/redwood.git
cd redwood
corepack enable
yarn install

...but Yarn is still using my local 1.x version:

joshgoldberg ~/repos/redwood $ corepack enable
joshgoldberg ~/repos/redwood $ yarn install
yarn install v1.22.19
[1/4] 🔍  Resolving packages...
error Couldn't find package "//verdaccio.tobbe.dev/" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
joshgoldberg ~/repos/redwood $ 

How do we reproduce the bug?

  1. Press . on https://github.com/redwoodjs/redwood
  2. Set up a new codespace
  3. In the terminal, run corepack enable and yarn install

What's your environment? (If it applies)

I copied this from another issue I filed recently:

System:
    OS: macOS 13.2
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 20.11.0 - /var/folders/sr/j__6_9gn0dv557z0xf3p7y8h0000gn/T/yarn--1719857847260-0.8362240404148904/node
    Yarn: 1.22.19 - /var/folders/sr/j__6_9gn0dv557z0xf3p7y8h0000gn/T/yarn--1719857847260-0.8362240404148904/yarn
  Databases:
    SQLite: 3.39.5 - /usr/bin/sqlite3
  Browsers:
    Chrome: 124.0.6367.93
    Safari: 16.3
  npmPackages:
    @redwoodjs/core: 7.7.2 => 7.7.2 
    @redwoodjs/project-config: 7.7.2 => 7.7.2 
  redwood.toml:
    [web]
      title = "Redwood App"
      port = 8910
      apiUrl = "/.redwood/functions" # You can customize graphql and dbauth urls individually too: see https://redwoodjs.com/docs/app-configuration-redwood-toml#api-paths
      includeEnvironmentVariables = [
        # Add any ENV vars that should be available to the web side to this array
        # See https://redwoodjs.com/docs/environment-variables#web
      ]
    [api]
      port = 8911
    [browser]
      open = true
    [notifications]
      versionUpdates = ["latest"]

...because trying to run the command in my local repo gives:

 $ yarn rw info
yarn run v1.22.19
error Command "rw" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Are you interested in working on this?

  • I'm interested in working on this

I've hit confusing issues with Yarn versioning before (yarnpkg/berry#4426) and have no interest in working on this myself. 😄

@JoshuaKGoldberg JoshuaKGoldberg added the bug/needs-info More information is needed for reproduction label Jul 1, 2024
@Tobbe
Copy link
Member

Tobbe commented Jul 2, 2024

I filed an issue with corepack about this nodejs/corepack#507
As I write in the issue description, a workaround is to use corepack yarn instead of just yarn. And corepack yarn build, corepack yarn rebuild-test-project-fixture etc.

I'll give the corepack people some time to to reply to my issue before I decide what the best way forward here is

@Tobbe Tobbe self-assigned this Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/needs-info More information is needed for reproduction topic/ops-&-contributing-dx
Projects
None yet
Development

No branches or pull requests

2 participants