The Vercel build pipeline only supports Yarn 2 for static builds. Serverless Functions and SSR (Server-side Rendering) will not work with Yarn 2. The Vercel build pipeline fully supports Yarn 1 for all deployment types.
If you would like to request further support of Yarn 2 in the Vercel build pipeline, please submit feedback as described here.