Skip to main content

Sites Troubleshooting

Build failed: repository not found​

Your GitHub repo is private. Add GITHUB_TOKEN as an environment variable in Settings → Environment Variables:

Key: GITHUB_TOKEN
Value: github_pat_xxxxxxxxxxxx (fine-grained token, Contents: Read-only)

Get a token at github.com → Settings → Developer Settings → Fine-grained tokens.

Build failed: output directory not found​

Your build command ran but the output directory does not exist.

Check your framework preset:

FrameworkExpected output directory
React / Vitedist
Next.js (static)out
Vuedist
Nuxt.output/public

For Next.js static export, add to next.config.js:

module.exports = {
output: 'export'
}

Site shows blank page​

Your app uses client-side routing (React Router, Vue Router) but the server is returning 404 for deep links.

NaijaBase Sites automatically handles this with:

try_files $uri $uri/ /index.html;

If you still see a blank page:

  • Check the browser console for JavaScript errors
  • Make sure your build output contains index.html
  • Check the basename / base URL in your router config matches the path

Custom domain showing SSL error​

DNS has not propagated yet. Wait 5–15 minutes after adding the CNAME record, then click Verify and Connect again.

Check propagation:

dig CNAME yourdomain.com
# Should show: yourdomain.com CNAME yourslug.sites.naijabase.dev

Build times out after 5 minutes​

Your build is taking too long. Common causes: too many dependencies, or a build script doing unnecessary work.

Try replacing npm install with:

npm ci --prefer-offline

Or update the Install command in Settings to npm ci.

Site deployed but shows old content​

Your browser is serving a cached version. Hard-reload with Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac).

If the issue persists after a hard reload, check the Deployments tab to confirm the latest deployment status is live.

Custom domain requires Growth plan​

Custom domains are available on the Growth plan (₦25,000/month) and above. The Starter plan only supports yoursite.sites.naijabase.dev subdomains.

Upgrade at app.naijabase.dev/billing.