Running astro build with STATIC_BUILD=true outside of tinacms dev (and without a reachable MongoDB) produces no pages, no error, and exit code 0. The log ends mid-build, right after a content loader starts:
11:20:47 [content] Syncing content
11:20:47 [i18n-loader] Fetching data.
(process exits 0)
What happens: the loaders query TinaCMS through @tina/databaseClient, which talks to the datalayer directly. With no datalayer available the query never settles, node runs out of pending work, and the process exits cleanly in the middle of the await. In a script or CI job this looks like a successful build unless something inspects dist/.
The build should fail loudly when the datalayer can't be reached — a connection timeout or an upfront reachability check in the loaders would both do it.
Workaround for local static builds: run the build inside the datalayer, TINA_PUBLIC_IS_LOCAL=true tinacms dev -c "astro build". (On Netlify this doesn't bite because MongoDB is reachable at build time.)
Found while running a static build of marronage staging locally (dhtools performant-software/dhtools#17).
Running
astro buildwithSTATIC_BUILD=trueoutside oftinacms dev(and without a reachable MongoDB) produces no pages, no error, and exit code 0. The log ends mid-build, right after a content loader starts:What happens: the loaders query TinaCMS through
@tina/databaseClient, which talks to the datalayer directly. With no datalayer available the query never settles, node runs out of pending work, and the process exits cleanly in the middle of the await. In a script or CI job this looks like a successful build unless something inspectsdist/.The build should fail loudly when the datalayer can't be reached — a connection timeout or an upfront reachability check in the loaders would both do it.
Workaround for local static builds: run the build inside the datalayer,
TINA_PUBLIC_IS_LOCAL=true tinacms dev -c "astro build". (On Netlify this doesn't bite because MongoDB is reachable at build time.)Found while running a static build of marronage staging locally (dhtools performant-software/dhtools#17).