I have recently switched to using yarn2 for my project and I’m facing the following build problem (happens during yarn install). doing Yarn install works locally
9:27:23 PM: Build ready to start
9:27:25 PM: build-image version: 3571f0130496395a23bffe9820bc78b4f73a6234
9:27:25 PM: build-image tag: v3.7.0
9:27:25 PM: buildbot version: 68839536b64446440278e07b38fcad98216e3497
9:27:26 PM: Fetching cached dependencies
9:27:26 PM: Starting to download cache of 323.3MB
9:27:38 PM: Finished downloading cache in 12.082623751s
9:27:38 PM: Starting to extract cache
9:27:54 PM: Finished extracting cache in 16.020437877s
9:27:54 PM: Finished fetching cache in 28.434891886s
9:27:54 PM: Starting to prepare the repo for build
9:27:55 PM: Preparing Git Reference refs/heads/master
9:28:09 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'public' versus 'public/' in the Netlify UI
9:28:10 PM: Starting build script
9:28:10 PM: Installing dependencies
9:28:10 PM: Python version set to 2.7
9:28:11 PM: Started restoring cached node version
9:28:14 PM: Finished restoring cached node version
9:28:15 PM: Downloading and installing node v15.11.0...
9:28:16 PM: Downloading https://nodejs.org/dist/v15.11.0/node-v15.11.0-linux-x64.tar.xz...
9:28:16 PM: Computing checksum with sha256sum
9:28:16 PM: Checksums matched!
9:28:21 PM: Now using node v15.11.0 (npm v7.6.0)
9:28:21 PM: Started restoring cached build plugins
9:28:21 PM: Finished restoring cached build plugins
9:28:21 PM: Attempting ruby version 2.7.1, read from environment
9:28:23 PM: Using ruby version 2.7.1
9:28:24 PM: Using PHP version 5.6
9:28:24 PM: Started restoring cached yarn cache
9:28:24 PM: Finished restoring cached yarn cache
9:28:26 PM: Found yarn version (2.4.1) that doesn't match expected (1.22.4)
9:28:26 PM: up to date, audited 1 package in 311ms
9:28:26 PM: found 0 vulnerabilities
9:28:26 PM: Installing yarn at version 1.22.4
9:28:26 PM: Installing Yarn!
9:28:26 PM: > Downloading tarball...
9:28:26 PM: [1/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz --> /tmp/yarn.tar.gz.Ru75UDi4P4
9:28:26 PM: % Total % Received % Xferd Average Speed Time Time Time Current
9:28:26 PM: Dload Upload Total Spent Left Speed
9:28:26 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
9:28:26 PM: 100 79 100 79 0 0 282 0 --:--:-- --:--:-- --:--:-- 283
9:28:26 PM: 100 93 100 93 0 0 173 0 --:--:-- --:--:-- --:--:-- 173
9:28:27 PM: 100 625 100 625 0 0 743 0 --:--:-- --:--:-- --:--:-- 743
9:28:27 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
9:28:27 PM: 100 1215k 100 1215k 0 0 889k 0 0:00:01 0:00:01 --:--:-- 2333k
9:28:27 PM: [2/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz.asc --> /tmp/yarn.tar.gz.Ru75UDi4P4.asc
9:28:27 PM: 100 83 100 83 0 0 1925 0 --:--:-- --:--:-- --:--:-- 1925
9:28:27 PM: 100 97 100 97 0 0 1356 0 --:--:-- --:--:-- --:--:-- 1356
9:28:27 PM: 100 629 100 629 0 0 6372 0 --:--:-- --:--:-- --:--:-- 6372
9:28:27 PM: 100 1028 100 1028 0 0 7026 0 --:--:-- --:--:-- --:--:-- 7026
9:28:27 PM: > Verifying integrity...
9:28:27 PM: gpg: Signature made Mon 09 Mar 2020 03:52:13 PM UTC using RSA key ID 69475BAA
9:28:27 PM: gpg: Good signature from "Yarn Packaging <yarn@dan.cx>"
9:28:27 PM: gpg: WARNING: This key is not certified with a trusted signature!
9:28:27 PM: gpg: There is no indication that the signature belongs to the owner.
9:28:27 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310
9:28:27 PM: Subkey fingerprint: 6D98 490C 6F1A CDDD 448E 4595 4F77 6793 6947 5BAA
9:28:27 PM: > GPG signature looks good
9:28:27 PM: > Extracting to ~/.yarn...
9:28:28 PM: > Adding to $PATH...
9:28:28 PM: > Successfully installed Yarn 1.22.4! Please open another terminal where the `yarn` command will now be available.
9:28:28 PM: Started restoring cached node modules
9:28:28 PM: Finished restoring cached node modules
9:28:29 PM: Installing NPM modules using Yarn version 2.4.1
9:28:30 PM: ➤ YN0050: The cache-folder option has been deprecated; use rc settings instead
9:28:30 PM: Internal Error: Workspace not found (/)
9:28:30 PM: at ie.getWorkspaceByCwd (/opt/build/repo/.yarn/releases/yarn-2.4.1.cjs:2:354146)
9:28:30 PM: at ie.get topLevelWorkspace [as topLevelWorkspace] (/opt/build/repo/.yarn/releases/yarn-2.4.1.cjs:2:353891)
9:28:30 PM: at T (/opt/build/repo/.yarn/releases/yarn-2.4.1.cjs:2:279347)
9:28:30 PM: at te.findPackageLocator (/opt/build/repo/.yarn/releases/yarn-2.4.1.cjs:2:266710)
9:28:30 PM: at ie.findLocatorForLocation (/opt/build/repo/.yarn/releases/yarn-2.4.1.cjs:2:356963)
9:28:30 PM: at async Function.find (/opt/build/repo/.yarn/releases/yarn-2.4.1.cjs:2:350480)
9:28:30 PM: at async de.execute (/opt/build/repo/.yarn/releases/yarn-2.4.1.cjs:2:76746)
9:28:30 PM: at async de.validateAndExecute (/opt/build/repo/.yarn/releases/yarn-2.4.1.cjs:2:660570)
9:28:30 PM: at async Y.run (/opt/build/repo/.yarn/releases/yarn-2.4.1.cjs:17:3854)
9:28:30 PM: at async Y.runExit (/opt/build/repo/.yarn/releases/yarn-2.4.1.cjs:17:4021)
9:28:30 PM: Error during Yarn install
9:28:30 PM: Build was terminated: Build script returned non-zero exit code: 1
9:28:30 PM: Failing build: Failed to build site
9:28:30 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1
9:28:30 PM: Finished processing build request in 1m4.909626445s
Site name: determined-haibt-ab63ba
build settings: