What is going on
The app Codex built runs fine on your computer. After you put it online, the page is blank, a feature fails, or the host reports a failed build.
The code is the same in both places. What differs is everything around it: settings, versions, the database and how the app is started.
Error messages you might see
Common causes
- Environment variables or API keys exist in your local
.envfile but were never added to the hosting service. - The hosting service uses a different version of Node, Python or another runtime than your computer.
- The build command or start command in the host settings does not match what you run locally.
- The app points at a local database or a local address such as
localhost. - File names that differ only by capital letters: this works on a Mac or Windows computer and fails on a Linux server.
How to fix it
- Open the host's build log and the runtime log. The first error line usually names the cause.
- Compare the list of environment variables in the host with the ones in your local
.envfile. Add anything missing. - Set the same runtime version in the host as on your computer.
- Check that the build and start commands in the host match what you run locally.
- Search the code for
localhostand fixed addresses, and replace them with settings. - Check capital letters in file names and imports.
Getting help takes about a minute
No hiring, no back and forth. A real person looks at your app.
-
1
Describe it
Tell us what you need in plain words. You don't have to be technical or have an account to start.
-
2
Free 15-minute call
A verified developer calls you. Many tasks are sorted right there, and it costs nothing.
-
3
Pay after you approve
If there is more to do, you get one fixed price up front. You pay only once you are happy.
Real people, reviewed by hand
Developers who do this every day
Every developer is approved by our team before they can take a task. Describe yours and the first one who is free picks it up.
Get helpQuestions
Why does it work locally but not online?
Your computer and the host differ in settings, versions and the database. Almost every case comes down to one of those three.
Where do I find the real error?
In the host's build log and runtime log, not in the page you see in the browser.