The build is failing with "Failed: build output directory not found"

This used to be working fine, but it has stopped.

When I run “npm run build” locally it works just fine and I get the build directory created.

What is it looking for when validating the output directory?

It’s looking for the output directory you specified in the build options:

Is something failing in the build? What do the logs say? What directory do you get when running locally?

Do you have the Pages build logs available?

Logs is as follows:

|21:53:44.510|Creating an optimized production build...|
|21:54:02.825|Note: No functions dir at /functions found. Skipping.|
|21:54:02.826|Validating asset output directory|
|21:54:02.826|Error: Output directory build not found.|
|21:54:03.705|Failed: build output directory not found|

Output directory is specified as /build and I see that directory when I run it locally