What is Deploy?
Putting a new version of your app online so users get it.
Where Deploy goes wrong in real apps
Each of these is a short scenario built from a real failure in an app made with AI. Read the answer here, or walk through it yourself in about four minutes.
The life of a click · 4 minutes · Pro
Works on my machine
Sign-up works perfectly on your laptop. On the live site, every sign-up fails.
Read the fixWhy does it work locally but not in production?
The most common cause is a missing environment variable. Your .env file exists only on your laptop; production has its own settings. Add the variable in your hosting dashboard, redeploy, and validate required variables at startup so a missing one fails the deploy instead of your users.
Keeping it running · 4 minutes · Pro
Update everything, deploy nothing
You asked your AI to 'update everything to the latest versions'. The app runs on your laptop, but the deploy fails and the live site is stuck on the old version.
Read the fixWhy does my build fail after updating packages?
Usually because a package jumped a major version, which can change how it works, or because package.json and the lockfile no longer match, so the build server installs different versions than your laptop or refuses to install. Update one package at a time, read upgrade notes for major versions, and commit the lockfile with package.json.
Working with your AI agent · 4 minutes · Free
Approve this command?
Your coding agent wants to clean up old build files before a fresh build. It asks you to approve one command.
Walk it, freeWhich AI agent commands should I always check?
Always read commands that delete, move, reset or force-push before approving them. Shell variables are replaced before a command runs, so an empty variable can turn rm -rf "$HOME/$CACHE_DIR" into deleting your whole home folder. Auto-approve only harmless commands, and run agents in a contained folder.
Launch day · 4 minutes · Pro
Sign in with Google: Error 400
'Sign in with Google' works perfectly on your laptop. On your real domain, users see 'Error 400: redirect_uri_mismatch'.
Read the fixHow do I fix Google redirect_uri_mismatch?
Add the exact callback URL your app uses in production to the allowed redirect URIs in Google Cloud Console and in your auth provider. It must match exactly, including https, domain, path and trailing slash. Google does not allow wildcards, so give each environment that needs sign-in a stable address.
Who may see what · 4 minutes · Pro
Day 31: permission denied
Your app worked for a month. Today every read fails with 'permission denied'. Your AI has a one-line fix ready.
Read the fixWhy does Firebase deny access after 30 days?
Test-mode rules allow anyone to read and write until a date, then expire. When they expire, every request is denied. Do not replace them with 'if true', which opens the database permanently. Write rules that let users access only their own documents, checked against request.auth.uid.
Into the app stores · 4 minutes · Pro
Version 1.0 is still out there
You renamed a field in your API and shipped version 1.1. The website works. A third of your app users now see a blank screen.
Read the fixWhy did my API change break old app versions?
Phone apps update only when each user chooses to, so older versions keep calling your server for months. Renaming or removing a field breaks every version that still reads it. Add new fields alongside old ones, remove old ones only when almost nobody uses those versions, and send the app version with each request.
Related terms
- Production
- The real, live version of your app that customers use, as opposed to the copy on your laptop.
- Git, commit, repository
- Git saves snapshots (commits) of your code in a repository, so you can see history and go back.
- API
- The part of an app that other programs talk to. Your app's pages ask its API for data, like a waiter taking orders to a kitchen.
- Request
- A message your browser (or any program) sends to a server asking for something: 'give me invoice 105' or 'save this profile'.
- Server
- A computer that runs your app's code out of sight. Users can't change what happens there, which is why checks belong there.
- Authentication
- Checking who someone is, usually by signing in.