I have like a 100 static pages generated every time the website is built. But the problem that I am facing is the build tries to create all 100 pages, even if one of the 100 pages suppose 20th page has had an error thrown for whatever reason.
I am looking for a way to stop the build as soon as there is a single instance of webpage not building successfully.
I am using nextJS and been using 'next build' to create a build.