Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Yarn is installed twice when using Yarn Berry #716

Closed
mcmxcdev opened this issue Jan 7, 2022 · 1 comment
Closed

Yarn is installed twice when using Yarn Berry #716

mcmxcdev opened this issue Jan 7, 2022 · 1 comment

Comments

@mcmxcdev
Copy link

mcmxcdev commented Jan 7, 2022

We are in the process of migrating from Yarn v1 to Yarn v3 and I noticed this in the logs:

9:58:38 AM: Found yarn version (3.1.1) that doesn't match expected (1.22.10)
9:58:38 AM: up to date, audited 1 package in 425ms
9:58:38 AM: found 0 vulnerabilities
9:58:38 AM: Installing yarn at version 1.22.10
9:58:38 AM: Installing Yarn!
9:58:38 AM: > Downloading tarball...
....
9:58:39 AM: > Successfully installed Yarn 1.22.10! Please open another terminal where the `yarn` command will now be available.
9:58:40 AM: Yarn workspaces detected
....
9:58:41 AM: Installing NPM modules using Yarn version 3.1.1
9:58:43 AM: ➤ YN0050: The cache-folder option has been deprecated; use rc settings instead
9:58:43 AM: ➤ YN0000: ┌ Resolution step
....

NETLIFY_USE_YARN = "true" -> set as env var
YARN_VERSION -> NOT set as env var

What are the necessary steps to make the Netlify image install Yarn Berry only?

@JGAntunes
Copy link
Contributor

Hey @mhatvan, thanks for opening this issue.

This is actually a duplicate of #594 and related with #612. The problem is related with the way we rely on yarn --version to detect a mismatch between the default/configured yarn version and the way yarn-path works within the .yarnrc. tl;dr the right binary is already installed, we just go throught it twice because of the way this is checked.

Closing as duplicate 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants