3 months ago
Service: BoostWorld Backend (Strapi)
Branch:backend-v1.3
Commits Pushed: 8 updates (including e3befc7 - Railpack switch)
Problem:
Despite pushing multiple code updates and successful Railway deployments, old build artifacts persist, causing:
Backend server runs (health check works)
Admin panel shows blank page with React errors
Webpack-bundled components use cached/corrupted chunks
Evidence:
Code pushed: 8 commits with build improvements
Deployments succeed: Railway shows "Deployed" status
Old code still runs: Admin panel exhibits same errors from initial deployment
Health endpoint works: New middleware code is running (proves partial deployment)
What We've Tried:
# Clean install (every build)
rm -rf node_modules package-lock.json
npm cache clean --force
# Clean build (every build)
rm -rf dist build .cache
npm run build
# Switched builders
NIXPACKS → RAILPACK (commit e3befc7)
Result: Build cache still not clearing between deployments
Question for Railway:
How do we force a complete build cache invalidation? The webpack admin panel bundles appear to be persisting across deployments despite:
Cleaning build directories
Switching builders
Fresh npm installs
Current deployment shows mixed state: new server code running (health check middleware works) but old admin panel bundles still being served.
Impact: Backend stable, admin panel unusable due to stale React component bundles.
2 Replies
2 months ago
Have you tried using an incognito browser? It might be due to browser caching.
2 months ago
here's what you need to do:
in railway service settings → environment variables, add NODE_ENV=production and make sure you check the box that says "available during build time" - this is the real issue. strapi admin panel needs to be built with production env, not just run with it.
then add NO_CACHE=1 to force cache clear.
redeploy after that. the admin panel builds separate static files and without production env during build it creates broken bundles that try to connect to localhost. that's why your health check works (runtime code) but admin fails (prebuild static assets).
browser cache could be part of it but this is the root cause.