3 months ago
Please help share steps to do a clean build. Earlier build configuration are persisting and builds are failing even with latest code in Git
1 Replies
2 months ago
This is the standard way to force Railway to ignore previous build layers and start fresh.
Navigate to your project in the Railway Dashboard.
Select the specific Service that is failing.
Go to the Variables tab.
Add a new variable:
Key:
NO_CACHEValue:
1
Click Add and then Redeploy.
Railway will now ignore all cached layers for this deployment. Once the build succeeds, you can remove this variable to restore faster cached builds for future updates.
If you prefer using the command line, the Railway CLI has a flag to force a redeploy which often clears transient issues.
Open your terminal.
Run the following command:
bashrailway redeploy --service <service-name>Note: While a direct
--no-cacheflag is requested by users, the most effective CLI method currently mirrors the dashboard approach or triggers a fresh deploy logic