Skip to content

Troubleshooting

The CLI prints success data to stdout. With --json, success is one JSON object or array. Errors are printed to stderr and the process exits non-zero.

The default dist directory does not exist.

Fix it by building first or passing the correct output path:

Terminal window
npm run build
npx wgw-deploy
npx wgw-deploy --dir public

The explicit --dir path does not exist or is not a file or directory.

Terminal window
npx wgw-deploy --cwd /path/to/app --dir build

The target is empty, or every file was ignored. The CLI skips symlinks and ignores common local or sensitive paths, including .git, node_modules, .cache, .turbo, .wrangler, coverage, .env*, database files, private keys, certificates, and SSH-related files.

Choose a static output folder that contains publishable files.

The deploy has more than 5,000 files.

One file is larger than 10 MiB.

The combined deploy is larger than the service limit.

request body too large, manifest too large, bad manifest, or empty manifest

Section titled “request body too large, manifest too large, bad manifest, or empty manifest”

These usually mean a custom client or self-hosted integration sent an invalid prepare request. The normal CLI builds the manifest for you.

bad manifest path: <path> or reserved manifest path: <path>

Section titled “bad manifest path: <path> or reserved manifest path: <path>”

Manifest paths must be safe relative paths for the project. _rev is reserved for pinned revision URLs.

The CLI does not accept positional deploy targets. Use --dir.

Terminal window
npx wgw-deploy --dir dist

missing value for --dir, missing value for --cwd, or missing value for --domain

Section titled “missing value for --dir, missing value for --cwd, or missing value for --domain”

Pass the required value after the flag.

Terminal window
npx wgw-deploy --cwd /path/to/app --dir build
npx wgw-deploy --domain preview.wgw.lol

Check the supported options:

Terminal window
npx wgw-deploy --help

The CLI could not connect to the API. Check the network. If you override the API endpoint, check WGW_API_URL.

Terminal window
WGW_API_URL=https://deploy.wgw.lol npx wgw-deploy --dir dist

WGW_API_URL must be an http or https URL.

The local project state has an invalid API token for the remote project. Use the original local state, or create a fresh project by deploying from a different --cwd plus --dir pair.

The request reached a real project, but the local project hash or anonymous machine fingerprint did not match. Use the same --cwd and --dir that created the project.

Terminal window
npx wgw-deploy --list --json

Generated projects can expire if they do not have an assigned non-default domain. The deploy command removes stale local state and retries automatically. Delete and domain-delete commands treat expired projects as already deleted.

The hostname is invalid. Do not include https://, paths, ports, spaces, @, or nested WGW labels.

Use:

Terminal window
npx wgw-deploy --domain preview-build
npx wgw-deploy --domain docs.example.com

Do not use:

Terminal window
npx wgw-deploy --domain https://docs.example.com/path

The WGW subdomain name is reserved. Pick another name.

The requested WGW subdomain is already serving something. Pick another WGW subdomain.

The API could not check the requested WGW subdomain. Retry later.

Cloudflare Custom Hostname failed: <details>

Section titled “Cloudflare Custom Hostname failed: <details>”

The external hostname request was rejected by Cloudflare. Check that the hostname is valid and that you can create a CNAME for it.

The expected external DNS target is:

CNAME <your-hostname> -> cname.wgw.lol

This is a self-hosting configuration error. External custom domains require CLOUDFLARE_ZONE_ID on the API worker.

List tracked projects:

Terminal window
npx wgw-deploy --list
npx wgw-deploy --list --json

Remove a custom domain:

Terminal window
npx wgw-deploy --delete-domain
npx wgw-deploy --delete-domain --json

Delete a project:

Terminal window
npx wgw-deploy --delete
npx wgw-deploy --delete --json