clockworklabs/SpacetimeDB · error · Error
Missing type name for
Error message
Missing type name for ${typeBuilder.constructor.name ?? 'TypeBuilder'} ${JSON.stringify(typeBuilder)} What it means
spacetime publish accepts a parent database either via --parent <parent> or inline in the database name as <parent>/<child>. validate_name_and_parent splits the name on '/'; when both forms are supplied they must designate the same parent, otherwise the request is ambiguous and rejected. (Equal values are allowed and deduplicated; the parent must also be a valid domain or identity.)
Solutions
- Drop --parent and keep only the path form: spacetime publish myorg/mydb.
- Or keep --parent myorg and pass only the child name: spacetime publish --parent myorg mydb.
- If both must appear (e.g. templated commands), make them identical — the duplicate is accepted.
Example fix
# before spacetime publish --parent alice myorg/mydb # after spacetime publish myorg/mydb # or spacetime publish --parent myorg mydb
Defensive patterns
Strategy: validation
Validate before calling
if [[ "$DB_NAME" == */* && -n "$PARENT" && "$PARENT" != "${DB_NAME%%/*}" ]]; then
echo "conflicting parent: --parent $PARENT vs $DB_NAME"; exit 1
fi Prevention
- Standardize on one form (recommended: <parent>/<child>) in scripts and docs.
- If a wrapper always sets --parent, have it strip a leading parent/ segment from the name instead of passing both.
When it happens
Trigger: spacetime publish --parent alice myorg/mydb where myorg != alice. Also fires for any invocation with a slash-containing name plus a --parent value that differs from the path's first segment.
Common situations: Shell history reuse (--parent left over plus an edited name); wrapper scripts that always set --parent while the user types a path-style name; muscle memory from tools where both are accepted independently.
Related errors
- Cannot use module-specific arguments
- Too many environment removals
- Aborted.
- AddColumns: table ` ` not found in new module def
- AddConstraint: ` ` not found in new module def
AI-assisted analysis of clockworklabs/SpacetimeDB@eddf9f5014 (2026-08-20).
Data as JSON: /api/errors/0600a8f1cb852858.
Report an issue: GitHub.
Appendix: source
Thrown at crates/bindings-typescript/src/lib/schema.ts:363
) as any;
} else {
return typeBuilder as any;
}
}
#registerCompoundTypeRecursively<
T extends
| SumBuilder<VariantsObj>
| ProductBuilder<ElementsObj>
| RowBuilder<RowObj>,
>(typeBuilder: T): RefBuilder<Infer<T>, InferSpacetimeTypeOfTypeBuilder<T>> {
const ty = typeBuilder.algebraicType;
// NB! You must ensure that all TypeBuilder passed into this function
// have a name. This function ensures that nested types always have a
// name by assigning them one if they are missing it.
const name = typeBuilder.typeName;
if (name === undefined) {
throw new Error(
`Missing type name for ${typeBuilder.constructor.name ?? 'TypeBuilder'} ${JSON.stringify(typeBuilder)}`
);
}
let r = this.#compoundTypes.get(ty);
if (r != null) {
// Already added to typespace
return r;
}
// Recursively register nested compound types
const newTy =
typeBuilder instanceof RowBuilder || typeBuilder instanceof ProductBuilder
? ({
tag: 'Product',
value: { elements: [] },
} as AlgebraicTypeVariants.Product)
: ({View on GitHub (pinned to eddf9f5014)