Skip to content

Better yarn handling #26480

Closed
Closed

Description

Describe the bug

We've had two separate bug reports where users have had a terrible "init on empty directory" experience.

In both cases, it was due to the presence of a stray yarn.lock file in a parent directory of the current directory. I.e.

/home/user/projects/yarn.lock
/home/user/projects/empty-dir

This caused Storybook to install with yarn1, which is broken, instead of using npm, which it would have done if the unrelated yarn.lock wasn't there.

We should fix this. In the empty directory case, if the code detects that the package manager is Yarn1, it should either ERROR with a clear explanation, and possibly even ask the user if there is a stray lockfile & what to do about it.

Alternatively, we could just ignore the detection in this specific case and use npm instead.

To Reproduce

No response

System

No response

Additional context

No response

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

Metadata

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions