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]: volta and corepack incompatibility on yarn start #23708

Closed
johnhunter opened this issue Aug 3, 2023 · 0 comments · Fixed by #23709
Closed

[Bug]: volta and corepack incompatibility on yarn start #23708

johnhunter opened this issue Aug 3, 2023 · 0 comments · Fixed by #23709

Comments

@johnhunter
Copy link
Contributor

johnhunter commented Aug 3, 2023

Describe the bug

Getting started docs indicate that we should use node@16 to work on the Storybook code. I use Volta to manage node versions but it does not work well with Node's corepack feature. Corepack uses the "packageManager" property in the package.json file to determine which manager and version to use but volta uses its own values and is not aware of "packageManager" setting. The Volta team are aware and our looking into ways to resolve volta-cli/volta#987 and volta-cli/volta#282.

In the meantime a workaround is to duplicate the settings:

{
  ...,
  "packageManager": "[email protected]",
  "volta": {
    "node": "16.20.1",
    "yarn": "3.5.1"
  }
}

If the community agrees I would like to propose that we add Volta pinning to the package.json. It has no effect if you don't use Volta but I understand it might not be for everyone. I'll raise a PR and see.

To Reproduce

  1. Install Volta (if not already installed)
  2. Fork https://github.com/storybookjs/storybook
  3. git clone the fork and cd into the project
  4. Run volta pin node@16
  5. Run yarn start

A bleeding edge RC version of yarn 4 is installed and build fails.

System

Apple M1 Pro / macOS 13.4.1
`volta --version`
1.1.1
`node --version`
v16.20.1

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant