Skip to content

fix: remove empty preview_image_url so the Deploy to Cloudflare button works#9

Open
tombeckenham wants to merge 1 commit into
heygen-com:mainfrom
tombeckenham:fix/deploy-button-preview-image-url
Open

fix: remove empty preview_image_url so the Deploy to Cloudflare button works#9
tombeckenham wants to merge 1 commit into
heygen-com:mainfrom
tombeckenham:fix/deploy-button-preview-image-url

Conversation

@tombeckenham

Copy link
Copy Markdown

Problem

The README's Deploy to Cloudflare button fails on this repo with:

There was a problem parsing the Wrangler configuration file. Please raise an issue in the Workers SDK repo.

Root cause

It isn't the Wrangler config. The button's template-metadata parser rejects the empty "preview_image_url": "" in package.json's "cloudflare" block, and the dashboard misattributes the failure to wrangler.jsonc. Filed upstream as cloudflare/workers-sdk#14831.

This was isolated by bisection against deploy.workers.cloudflare.com using fresh subdirectory paths of a public fork (the button caches its pass/fail verdict per repo/path for 30+ minutes, ignoring new commits — so each experiment needs a fresh path):

  • official containers-template + this repo's full wrangler.jsonc (containers, standard-4, Dockerfile image, custom build, assets, R2, vars) → ✅ passes
  • official template + this repo's package.json → ❌ fails
  • "cloudflare" block with only preview_image_url removed → ✅ passes; with only icon_urls removed (empty preview_image_url kept) → ❌ fails
  • this repo's complete app, wrangler.jsonc untouched, only this line removed → ✅ button reaches the configure/provision step (project name, R2 bucket picker, binding descriptions all render correctly)

Fix

Delete the empty "preview_image_url": "" line (one-line diff). wrangler.jsonc — including instance_type: "standard-4" — needs no changes. The empty "icon_urls": [] is harmless and kept.

To add a real preview image later, set the field to an actual image URL; it's only the empty string that kills the flow.

Note for verifying after merge

Because of the verdict caching above, the button may keep showing the stale error on this repo's URL for a while after merging. Verify via a fresh checkout path (e.g. the repo URL once the cache expires, or immediately via a copy under a new path).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant