corepack icon indicating copy to clipboard operation
corepack copied to clipboard

`corepack prepare` with a range of versions is unexpected

Open teppeis opened this issue 2 years ago • 0 comments

corepack prepare command with a range of versions behaves differently than expected.

Case 1

When:

  • [email protected] is the latest published version
  • no local cache (In OSX, $HOME/.cache/node/corepack/yarn is empty)

Actually:

$ corepack prepare yarn@~3.2.0
Usage Error: Failed to successfully resolve '~3.2.0' to a valid yarn release

My expectation: corepack installs [email protected] in the local cache.

Case 2

When:

Actually:

$ corepack prepare yarn@~3.2.0
Preparing yarn@~3.2.0...

but no additional versions are installed. There is nothing but [email protected] in the local cache.

My expectation: corepack installs [email protected] in the local cache.

teppeis avatar Sep 03 '22 17:09 teppeis