Persistent Build Cache Issue: Vercel Incorrectly Detects Package Manager Change from yarn to pnpm #80454
-
SummaryI have fully migrated our Next.js project from Yarn to pnpm. However, every new deployment on Vercel fails to use the build cache, stating: Skipping build cache since Package Manager changed from "pnpm" to "yarn". This happens despite ensuring pnpm is configured everywhere and attempting multiple cache-clearing strategies, leading to significantly slower build times. Project Configuration
Vercel Settings Attempted
Additional Steps Tried
Expected BehaviorBuild cache should be preserved between deployments using the same package manager (pnpm). Actual BehaviorEvery deployment shows "Skipping build cache since Package Manager changed from 'pnpm' to 'yarn'" despite pnpm being used consistently, resulting in full rebuilds and longer deployment times. ImpactSignificantly slower build times due to cache invalidation on every deployment. Additional informationBuild logs:
Running build in Washington, D.C., USA (East) – iad1
Build machine configuration: 4 cores, 8 GB
Cloning github.com/[my_project]
Cloning completed: 3.335s
Skipping build cache since Package Manager changed from "pnpm" to "yarn"
Running "vercel build"
Vercel CLI 42.2.0
Detected pnpm-lock.yaml 9 which may be generated by pnpm@9.x or pnpm@10.x
Using pnpm@9.x based on project creation date
To use pnpm@10.x, manually opt in using corepack (https://vercel.com/docs/deployments/configure-a-build#corepack)
Running "install" command: pnpm install...
Lockfile is up to date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +1697
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 1697, reused 0, downloaded 68, added 59
Progress: resolved 1697, reused 0, downloaded 148, added 131
.... ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
my bad, I had yarn in package that was outside of next package, after removing it, the error went away |
Beta Was this translation helpful? Give feedback.
my bad, I had yarn in package that was outside of next package, after removing it, the error went away