Skip to main content

Yarn 2+ dependency caching now supported

By Steven Van ·

Vercel now caches dependencies for Yarn 2 and newer, and the cache can be disabled with an environment variable if a project needs that.

Projects that use Yarn 2 or newer now get Vercel dependency caching, which is meant to cut install times and improve build performance. Until now, caching was only supported for npm, pnpm, Bun, and Yarn 1.

To turn caching off, set the environment variable VERCEL_FORCE_NO_BUILD_CACHE to 1 in the project settings. Projects on Yarn 4 should enable Corepack, as Yarn recommends. Vercel's Build Cache documentation has more detail.

Vercel
Vercel
The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.
View Vercel →

Original source

Read Yarn 2+ dependency caching now supported on Creators Toolbox