turbo icon indicating copy to clipboard operation
turbo copied to clipboard

Prune Command Writes Old Metadata Version to Yarn Lockfile

Open jpulec opened this issue 3 years ago • 1 comments

What version of Turborepo are you using?

1.3.1

What package manager are you using / does the bug impact?

Yarn v2/v3 (node_modules linker only)

What operating system are you using?

Linux

Describe the Bug

The _metadata: version identifier is hard-coded to be 5 in the turbo prune command, however the latest version of yarn uses 7. This may cause yarn to not identify a yarn.lock file generated by turbo prune as valid.

Expected Behavior

turbo prune should generate a lockfile with the version, based on the current version of yarn being used.

To Reproduce

  1. Run turbo prune. Lockfile generated will have 5 as the version.
  2. Try to run yarn install and yarn will not recognize out/yarn.lock and will try to generate it's own. Additionally, this means .yarn/cache cannot be used.

jpulec avatar Jul 08 '22 18:07 jpulec

Obligatory #643, Yarn v3 + prune is not supported. I mentioned this issue in my comment here: https://github.com/vercel/turborepo/pull/643#issuecomment-1122855212. Our team would love to have Yarn v3 support.

quinnturner avatar Aug 01 '22 12:08 quinnturner

With #2019 and the release of 1.5 we should now be producing the correct lockfile format for Yarn 2+. Please update turbo and try this out. Closing for now, but reopen if the issue persists.

chris-olszewski avatar Sep 21 '22 21:09 chris-olszewski