Skip to content

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

SymptomFirst checkNext step
No sites listedHas the site been assigned to your account?Ask your site manager to check site access.
Cannot find Start, Restart, or Environment VariablesSite type and manage permissionCheck 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.jsonAdd the app's production start command. See Node.js setup.
ENOENT or missing package.jsonDid the ZIP create an extra directory?Put the manifest and application files in the correct upload directory.
502 Bad Gateway after starting a Node appProcess, App Port, bind address, and environment variablesFollow the Node.js 502 checks.
Site opens but a page returns 404Missing file, application route, or SPA modeCheck the app route and static site configuration.
Upload rejectedFile size, write permission, available storageCheck the File Manager upload limit and ask your manager to verify the site's quota.
HTTPS certificate failsDNS records and certificate validationUse SSL troubleshooting.
A Git push did not deployAuto deploy, selected branch, deployment historyCheck 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.

  1. Confirm that package.json is in the site's document root and contains the correct production start script.
  2. If the app needs compiled output, run Build & Restart. Otherwise, start it with Start Node App.
  3. In Manage → Edit Site, check App Port. The application's listen port must match; the Node default is 3000.
  4. Confirm the app listens on 0.0.0.0, rather than only localhost. NitHost supplies PORT and host variables, but the application's code must use them.
  5. Check required database connections and environment variables. Restart after changing runtime values.
  6. 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 build still 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.

Customer documentation · Nusite IT Consulting Limited