@joeroot This doesn’t help you answer your current issue, but it may help you debug on Netlify in future:
The exit code is not the error, it’s just the end result.
Take a look at this feature request that I made for more info:
https://answers.netlify.com/t/error-message-command-failed-with-exit-code-is-confusing-misleading/118887