Fix Vercel pnpm install failure#6
Merged
Merged
Conversation
The pnpm-workspace.yaml only declared build-script approval and had no packages field. On the deploy target (pnpm 9.x) that file forces workspace mode, which requires a packages field, so install failed with "packages field missing or empty". Move build-script approval to pnpm.onlyBuiltDependencies in package.json, which pnpm 9.x reads, and drop the workspace file.
Add a packageManager field so local and Vercel use the same pnpm version, eliminating the config drift that broke the last deploy. Pin to 9.x to match Vercel's current selection. Bump Next 14.2.6 -> 14.2.35 for the latest 14.x bug and security fixes (no major-version changes).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The production deploy on
mainis failing atpnpm installwithERROR packages field missing or empty.Cause
pnpm-workspace.yamldeclared only build-script approval and had nopackagesfield. On the deploy target (pnpm 9.x, which Vercel selects by project creation date) the presence of that file forces workspace mode, which requires apackagesfield — so install aborts.Changes
pnpm-workspace.yaml; move build-script approval topnpm.onlyBuiltDependenciesinpackage.json(read by pnpm 9.x).packageManagerfield pinning pnpm to9.15.9so local and Vercel use the same version, eliminating the config drift that caused the break.14.2.6→14.2.35for the latest 14.x bug and security fixes (no major-version change).Verification
pnpm install --frozen-lockfile(the command Vercel runs) exits 0 with the pinned pnpm 9.15.9.pnpm run buildcompiles and prerenders all pages.