Pin pnpm so the Cloudflare build uses the right version - #15
Merged
Merged
Conversation
The Cloudflare build image defaults to pnpm 10 and failed on `pnpm install --frozen-lockfile` with "packages field missing or empty". `pnpm-workspace.yaml` carries pnpm 11 keys (`allowBuilds`, `minimumReleaseAgeExclude`) and no `packages` field, because this repo is not a workspace and the file exists only to hold pnpm settings. `packageManager` fixes it at the source. pnpm 10 reads the field and switches to the pinned version before it installs, so the workspace file is parsed by the pnpm that understands it. Verified against a clean clone with the global pnpm config isolated: `pnpm@10.11.1 install --frozen-lockfile` reports "Done using pnpm v11.17.0" and succeeds. Adding a `packages` field would also have worked, but it would turn the repo into a single-package workspace to satisfy a version it should not be running. CI drops its hardcoded pnpm version and reads `packageManager` instead, so local, GitHub Actions, and Cloudflare all agree.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
error-wolf | f7fd73a | Jul 31 2026, 02:50 AM |
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 first Cloudflare build failed:
pnpm-workspace.yamlholds pnpm 11 keys (allowBuilds,minimumReleaseAgeExclude) and has nopackagesfield, because this repo isnot a workspace. The file exists only to carry pnpm settings. pnpm 10 rejects
it.
packageManager: "pnpm@11.17.0"fixes it at the source: pnpm 10 reads thefield and switches to the pinned version before installing, so the file is
parsed by the pnpm that understands it.
Verified, not assumed
Against a clean
--depth 1clone of master with the global pnpm configisolated (
XDG_CONFIG_HOMEandNPM_CONFIG_USERCONFIGpointed at emptyfiles), so the environment matches Cloudflare rather than this machine:
pnpm@10.11.1 install --frozen-lockfilepnpm@10.11.1 install --frozen-lockfileFull suite after the change: format, lint (0 errors), typecheck, 65/65 tests,
build, all clean.
Why not add a
packagesfieldThat would also silence the error, but it turns the repo into a
single-package workspace purely to satisfy a pnpm version it should not be
running. Pinning the version is narrower and fixes the cause.
CI drops its hardcoded pnpm version and reads
packageManagerinstead, solocal, GitHub Actions, and the Cloudflare build all agree on one number.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Greptile Summary
Consolidates the pnpm version into one package-level source of truth.
package.json.pnpm/action-setupread that pin instead of duplicating it.Confidence Score: 5/5
The PR appears safe to merge with no actionable regressions identified.
The package-level pin preserves CI’s existing pnpm 11.17.0 version, is supported by the setup action, and remains compatible with the existing lockfile and pnpm configuration.
Important Files Changed
Reviews (1): Last reviewed commit: "build: pin pnpm so the Cloudflare build ..." | Re-trigger Greptile