Getting "Failed during stage 'building site': Build script returned non-zero exit code: 1" - works with netlify dev locally

Hey there, @antonsten :wave:

Thanks for reaching out! Can you elaborate on when this issue started? We experienced a brief error in CDN service when you wrote in (more details here) so my first thought is that this could be related.

If it is not resolved now that the CDN error has fixed, this Support Guide contains a ton of useful debugging tips that can likely help you solve your problem :slight_smile: Additionally, this Support Guide houses all of our resources for debugging build and deploy issues.

We also recommend trying to search the forums with the build error you encountered - itโ€™s likely your question was already asked by someone else!

If you are still having problems, please provide as much information as you can on what you have already tried, what your build settings are, your package.json, etc. Thanks!