5 months ago
Description
- The app is redeploying successfully, but the running container keeps serving an old Vite bundle (vendor-rf025SXh.js and funeral-home-dashboard-CsYmmQuv.js). New code that guards startBizCheckout is not present, causing the Subscription tab to crash in production. Local build produces a newer vendor file (e.g., vendor-CuykvTfb.js).
- We disabled Nixpacks/Railway build cache, added cache-bust commits, and redeployed many times. Startup logs still show the old vendor hash, indicating a cached build layer or stale dist/public is being reused.
Error seen in browser
ReferenceError: startBizCheckout is not defined ReferenceError: bizMonthlyPriceStarter is not defined
Key deploy log lines (latest)
[startup] serveStatic: vendorFromIndex = vendor-rf025SXh.js [startup] serveStatic: newestVendorByMtime = vendor-rf025SXh.js [startup] serveStatic: newestDashboardByMtime = funeral-home-dashboard-CsYmmQuv.js
Expected
After a clean build the vendor hash should change (e.g., to vendor-CuykvTfb.js) and the Subscription tab should load.
What we tried
- Added cache-bust file, multiple commits/pushes.
- Set nixpacks.toml to [build] cache = false.
- Set railway.json build cache = false.
- Added NIXPACKS_NO_CACHE=1 and CACHE=false env vars.
- Redeployed multiple times; builds succeed, but logs still show vendor-rf025SXh.js.
Build config (summary)
- Builder: Nixpacks (Node 20)
- Build command: npm run build
- Start command: npm run start
- dist is gitignored; assets are generated at build.
Ask
Please clear/flush the build cache or force a fully clean image build for the service (no cached layers). If needed, we can switch to a Dockerfile build, but a cache flush would likely resolve this.
(No repo link provided; no secrets included.)
5 Replies
5 months ago
The correct environment variable to disable build caching is NO_CACHE=1 - the variables you tried (NIXPACKS_NO_CACHE=1 and CACHE=false) aren't recognized by our build system.
Status changed to Awaiting User Response Railway • 5 months ago
brody
The correct environment variable to disable build caching is `NO_CACHE=1` \- the variables you tried (`NIXPACKS_NO_CACHE=1` and `CACHE=false`) aren't recognized by our build system.
5 months ago
Thank you. Do you have any other suggestions? I deleted the variables that are not recognized by Railway build system and added NO_CACHE=1 to disable build caching. Redeployed and logs still show same vendor. 1:18:26 PM [startup] serveStatic: vendorFromIndex = vendor-rf02S5Xh.js
1:18:26 PM [startup] serveStatic: newestVendorByMtime = vendor-rf02S5Xh.js
Status changed to Awaiting Railway Response Railway • 5 months ago
5 months ago
This thread looks like it was resolved but I cannot see what the solution was and it looks very similar to the issue I am having: URGENT: Deployments successful but Railway CDN serving cached frontend files - Railway Help Station
5 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open Railway • 5 months ago
5 months ago
We don't have a CDN and we don't do any network level caching, so with build caching disabled, if your application is still serving old files, that would be something on your end, I have gone ahead and opened this thread up to the community so they can help you debug this on your end.
5 months ago
Thanks, pushed a server-side fix to force the newest dashboard chunk and add a debug endpoint:
- In vite.ts:
- We now inject the newest funeral-home-dashboard-* chunk into the HTML if it isn’t already present.
- Added /__assets endpoint that reports which vendor/main/dashboard filenames and index mtime the server is using.
And It works.
Thank you for responding. This was really frustrating.