---
title: 'DF8002: Both devframes and context Passed to initHub/buildHub'
description: 'initHub/buildHub received both devframes and context; the two assembly modes are mutually exclusive.'
---
## Message
> `initHub`/`buildHub` received both `devframes` and `context`; the two assembly modes are mutually exclusive.
## Cause
`initHub` (and `buildHub`) assembles a hub two ways: **declaratively** (`devframes: [...]`, where it creates the hub context and mounts each devframe under `/`), or **from a pre-built context** (`context: ctx`, where your host framework already mounted the devframes). A `devframes` list cannot be mounted into a context it doesn't own, so passing both contradicts.
## Example
```ts
// ✗ Bad
initHub({
base: '/__devframes/',
devframes: [git],
context: myCtx
})
// ✓ Good, declarative:
initHub({
base: '/__devframes/',
devframes: [git]
})
// ✓ Good, bring your own context:
const ctx = await createHubContext({ host: myHost, cwd })
await ctx.install(git)
initHub({ base: '/__devframes/', context: ctx })
```
## Fix
Pick one mode. Use `configure(ctx)` on the declarative mode when you need post-mount registrations (docks, commands, terminals) on the instance-created context.
## Source
- [`packages/hub/src/node/initiate.ts`](https://github.com/devframes/devframe/blob/main/packages/hub/src/node/initiate.ts): `initHub` throws this during initialization when both options are present.
- [`packages/hub/src/node/build.ts`](https://github.com/devframes/devframe/blob/main/packages/hub/src/node/build.ts): `buildHub` throws this when both options are present.