Theme
Troubleshooting
Start with the action you took and the exact error. A warning about npm funding or an available update is different from a command failure.
Who can use this page? All customers. Some fixes require site manage permission or help from NitHost support.
Find the symptom
| Symptom | First check | Next step |
|---|---|---|
| No sites listed | Has the site been assigned to your account? | Ask your site manager to check site access. |
| Cannot find Start, Restart, or Environment Variables | Site type and manage permission | Check Site actions. File upload access alone is not enough. |
Missing script: "build" | Does the app need compilation? | For a direct-run app on an older server, use Start Node App. See Node build errors. |
Missing script: "start" | The scripts section in package.json | Add the app's production start command. See Node.js setup. |
ENOENT or missing package.json | Did the ZIP create an extra directory? | Put the manifest and application files in the correct upload directory. |
| 502 Bad Gateway after starting a Node app | Process, App Port, bind address, and environment variables | Follow the Node.js 502 checks. |
| Site opens but a page returns 404 | Missing file, application route, or SPA mode | Check the app route and static site configuration. |
| Upload rejected | File size, write permission, available storage | Check the File Manager upload limit and ask your manager to verify the site's quota. |
| HTTPS certificate fails | DNS records and certificate validation | Use SSL troubleshooting. |
| A Git push did not deploy | Auto deploy, selected branch, deployment history | Check Git deployment webhooks. |
Node.js 502 Bad Gateway
A 502 means the web server could not get a valid response from the application. Creating a site or completing an upload does not prove the app is running.
- Confirm that
package.jsonis in the site's document root and contains the correct productionstartscript. - If the app needs compiled output, run Build & Restart. Otherwise, start it with Start Node App.
- In Manage → Edit Site, check App Port. The application's listen port must match; the Node default is
3000. - Confirm the app listens on
0.0.0.0, rather than onlylocalhost. NitHost suppliesPORTand host variables, but the application's code must use them. - Check required database connections and environment variables. Restart after changing runtime values.
- Open Logs for Nginx errors. If the process exits or the cause is unclear, ask NitHost support for the managed application container's logs. Nginx logs do not contain all application stdout/stderr.
If the site is connected to GitHub, make changes in the repository and use Git Deployment → Deploy Now. Uploading files does not replace the active Git release.
Read a build failure
Look for the failing command and its error near the end of the output. Package installation messages, audit summaries, and npm update notices can appear before an unrelated error.
- Missing build script: current NitHost builds skip an absent default build script. Older servers need the Start workaround, or help from NitHost support.
- Dependency installation failure: check
package.json, the lockfile, and package registry access. A build cannot proceed if installation fails. - Existing build script failed: fix that script or its application error. An optional build step does not mean NitHost ignores failures.
- Custom Git command: runs as configured. A command explicitly containing
npm run buildstill requires a build script.
Review dependency security warnings separately. Do not run npm audit fix --force just to clear an unrelated startup error.
What to send your hosting provider
Include:
- The affected domain and site type.
- The action you selected and the time, including timezone.
- The exact error text, plus a screenshot if useful.
- What changed immediately before the failure: upload, dependency update, environment setting, or Git commit.
- Whether the problem affects one site or multiple sites.
For a Node script error, include the scripts section of package.json. Do not send passwords, API tokens, complete .env files, or unredacted database URLs. Use your provider's private support channel for logs.