Finally Fixed That Annoying Netlify Build Failure
You know that feeling when a build has been failing for weeks and you keep putting off the fix? Yeah, that was me with SnowTrack's Netlify deployment.
Turns out the culprit was 5 ESLint errors that snuck in during my last UI audit session. Since Create React App treats warnings as errors in CI builds, Netlify was basically giving me the cold shoulder every time I tried to deploy.
The Usual Suspects
Most of the issues were pretty straightforward cleanup:
- Unused variables in Expenses.js: Had a couple of
const res = await axios.put(...)calls where I wasn't actually using the response. Easy fix - just removed the assignment. - Destructuring leftovers in IntakeForm.js: Was pulling
digitsfrom an object but never using it. Classic copy-paste artifact. - React hooks dependency warnings in Settings.js: This one was more interesting. Had to add
loadProcessingFeesto some dependency arrays, and used an eslint-disable forDEFAULT_FEESsince it's just a static array defined in the component.
The Decision Points
I could have moved DEFAULT_FEES outside the component or wrapped it in useMemo, but honestly? It's just a constant array. Sometimes the pragmatic choice is to disable the lint rule rather than over-engineer a solution.
For loadProcessingFees, I went the other direction and added it to the deps since it's a useCallback anyway - stable reference, no performance hit.
Back in Business
Pushed the fixes to both saas-dev and main with commit adc5020. Netlify should be auto-deploying again now that ESLint is happy.
Still need to run that payment_method_fees migration on production, but that's a problem for future me. Right now I'm just glad to see those green checkmarks again.