A build or publish failed

A publish stops when Playcode cannot build the project, start it or check that it answers. The window names the step and the error. A failed publish does not replace a static site's live version, and a Cloud app that was live goes back to its previous version.

On this page

Ask the agent

The last publish failed. Read the log, fix the cause and publish again.

In a Cloud app it reads the build log, fixes the cause and publishes again; for a static site paste the error, and you choose Publish after the fix.

A static site: "The build failed"

#

Playcode could not build or upload the site. The window says "Make sure your project code is correct and works - the error is below." and shows the error under it. Common errors:

The error says What it means What to do
A file name and a line of your code The code has an error, so the site cannot be built Choose Got it, paste the error into the chat and ask the agent to fix it. Then choose Publish again
"The production build produced no files - nothing to publish." The build ran but made no site Ask the agent to check the project's entry file, like index.html
"Uploading ... failed with HTTP ... - the publish was aborted so the live site never sees a partial upload." A file did not reach Playcode Choose Publish again. If it fails again, get help from a person

The agent cannot see a static site's preview or publish it, so paste the exact error into the chat.

A Cloud app: "Publish failed"

#

The Deployment window shows the step that failed, What went wrong and Build details with the log. Download log saves the whole log.

  1. Ask the agent to read the log and fix the cause. It reads the last lines of the build log before it changes anything.
  2. Publish again, or let the agent publish when the fix is in.

If the app was live before, it stays up: "We rolled back to your previous version, so your site stays up." The rollback brings back the previous code. Database changes that the failed publish already made stay; to undo them too, restore the Before publish checkpoint. See Snapshots and rollback.

If this was the app's first publish, the app is not live yet. Fix the cause and publish again. If a live app does not answer after a failed publish, restore the Before publish checkpoint, or get help from a person.

A common cause is a value that exists only on the development computer. Production keeps its own secrets and settings: add the value in Settings, Secrets, under Production, then publish again. See Secrets and environment.

A Cloud app: "This workspace is based on older history than the published version"

#

The code on the development computer is older than the live version, so publishing it would roll the app back. The window says "Production was not changed - your live site is untouched." This can happen after you restore an older development checkpoint. Ask the agent to reconcile the two histories, then publish again.

The message "This workspace and the published version each have changes the other doesn't." has the same fix.

A Cloud app: "Publish cancelled"

#

The publish was stopped, with Cancel in the Deployment window or by the agent: "You stopped this publish - your live site is unchanged." Publish again when you are ready.

A Cloud app: "This run's log is no longer available."

#

Playcode could not load the build log of that publish. Publish again to get a fresh log. See Logs.

"Cloud publishing requires a paid plan" or "Cloud app limit reached"

#

The publish, or the change of a project into a Cloud app, did not start. Cloud apps need a Pro or Max plan, and a workspace can have 3 of them on Pro and 10 on Max. Every Cloud project counts, published or not; archived ones do not. Archive a Cloud project you no longer use, upgrade, or ask a person to raise the limit. See Plans and credits on one page.

"Publish failed:" followed by a reason

#

Playcode could not start the publish, and the reason follows the colon. Act on the reason. If it names nothing you can change, get help from a person and include the project's address.

For the steps of a normal publish, see Publish a website.