Docs/Deployment Troubleshooting

Deployment Troubleshooting

Fix provider connection, build, environment variable, and domain issues.

Deployment Troubleshooting

Each project has one active deployment provider. Check which one first (Publish ▾ shows the live site's status and address), then use that provider's dashboard for logs and detailed status. The project's ⋯ menu on the PhantomStudio dashboard links to it (Vercel Dashboard or Cloudflare Dashboard).

Provider Selection

If Vercel and Cloudflare Workers are both connected and the project has never been deployed, Publish ▾ offers Deploy to Vercel and Deploy to Cloudflare Workers: choose one. To switch an existing project to the other provider, use Deploy to Vercel or Deploy to Cloudflare in the project's ⋯ menu on the dashboard.

Token Or Permission Errors

Disconnect the provider in the dashboard's Connections panel and connect it again with a fresh token. Vercel tokens must belong to the account or team that owns the project. Cloudflare tokens need Account Settings: Read, Workers Scripts: Edit, and Workers KV Storage: Edit.

GitHub Access Errors

Provider API tokens let PhantomStudio call provider APIs. Vercel also needs its own GitHub connection (see Deploying to Vercel). Cloudflare Workers deploys need GitHub Actions to be enabled for the repository.

Deploy Shipped the Old Site

Deployments build what's on GitHub. Publish sends your changes there. Publish ▾ › Deploy now rebuilds without new changes, and offers to commit and push first when you have changes that aren't on GitHub yet.

Build Failures

Open the provider dashboard and inspect the failed build logs. The generated Astro project expects:

  • Install command: npm install
  • Build command: npm run build
  • Cloudflare Workers deploy command: npx wrangler deploy

To reproduce a build error, run npm run build in the editor's terminal (Code mode).

Publish Reports Overlapping Changes After Cloudflare Setup

The first Cloudflare deployment writes wrangler.jsonc, the Astro adapter config, package dependencies, and a GitHub Actions workflow directly to GitHub. If you changed the same files in the editor, your next publish asks you to resolve the overlap. See Publishing Changes and Resolving Conflicts.

Environment Variables

Saving Site ▾ › WordPress copies the WordPress and WooCommerce variables to the active provider. After changing them, deploy again (Publish ▾ › Deploy now) so the build uses the new values. On Vercel, Publish ▾ › Environment variables shows and edits the rest.

WooCommerce sync includes WordPress, WooCommerce, Stripe, PayPal, BACS, Turnstile, and public store currency keys.

Domains

On Vercel, use the DNS records shown in Publish ▾ › Domains. For Cloudflare Workers, add a Worker custom domain or route in the Cloudflare dashboard.

Deploy Hooks

For errors from a deploy hook URL (403, 400, 409, 401), see the table in Deploy Hooks.