Command failed with exit code 9: npm run build

While I still haven’t found any explanation on what exit code 9 is, I did solve my problem. I changed the build command in the Netlify deploy settings from npm run build to react-scripts build. That got rid of any errors and successfully deployed the site!