DF8006: Static Build Mount Escapes the Hub Base
A static hub build can only write mounts under its own base: "{urlBase}" escapes "{base}".
Message
A static hub build can only write mounts under its own base: "{urlBase}" escapes "{base}"
Cause
buildHub maps every mounted URL base to a directory under its outDir (which corresponds to the hub base at serve time), so a mount whose base lies outside the hub base has no on-disk location in the output. This happens when a devframe is installed with an explicit base outside the hub base, e.g. ctx.install(devframe, { base: '/elsewhere/' }) from configure.
Example
await buildHub({
outDir: 'dist/__devframes',
async configure(ctx) {
// ✗ Bad: `/tools/x/` is not under the `/__devframes/` hub base
await ctx.install(myDevframe, { base: '/tools/x/' })
},
})Fix
- Drop the
baseoverride so the devframe mounts at<hub base><id>/, or point it somewhere under the hub base. - Or move the hub
baseup (e.g.base: '/') so it contains every mount.
Source
packages/hub/src/node/build.ts:buildHub()'s mount-to-disk mapping throws this for any mount base outside the hub base.