Netlify deployment fails with message: failed during stage 'building site': Build script returned non-zero exit code: 127

hey there, sorry to hear you are having trouble.

So the issue is most likely this one:

Executing user command: ng build --prod

it’ll error like this if the angular package isn’t installed correctly or this command isn’t listed in your package.json or there is a mismatch between that and your build settings. Your app literally doesn’t know what ng is for some reason.

If I were you i’d start troubleshooting here.

also more info here:

if you can’t fix it, please post a screenshot of your build settings and also show us your package.json please.