{"record":{"id":"0600a8f1cb852858","repo":"clockworklabs/SpacetimeDB","slug":"missing-type-name-for-typebuilder-constructor-na","errorCode":null,"errorMessage":"Missing type name for ${typeBuilder.constructor.name ?? 'TypeBuilder'} ${JSON.stringify(typeBuilder)}","messagePattern":"Missing type name for (.+?) (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"crates/bindings-typescript/src/lib/schema.ts","lineNumber":363,"sourceCode":"      ) as any;\n    } else {\n      return typeBuilder as any;\n    }\n  }\n\n  #registerCompoundTypeRecursively<\n    T extends\n      | SumBuilder<VariantsObj>\n      | ProductBuilder<ElementsObj>\n      | RowBuilder<RowObj>,\n  >(typeBuilder: T): RefBuilder<Infer<T>, InferSpacetimeTypeOfTypeBuilder<T>> {\n    const ty = typeBuilder.algebraicType;\n    // NB! You must ensure that all TypeBuilder passed into this function\n    // have a name. This function ensures that nested types always have a\n    // name by assigning them one if they are missing it.\n    const name = typeBuilder.typeName;\n    if (name === undefined) {\n      throw new Error(\n        `Missing type name for ${typeBuilder.constructor.name ?? 'TypeBuilder'} ${JSON.stringify(typeBuilder)}`\n      );\n    }\n\n    let r = this.#compoundTypes.get(ty);\n    if (r != null) {\n      // Already added to typespace\n      return r;\n    }\n\n    // Recursively register nested compound types\n    const newTy =\n      typeBuilder instanceof RowBuilder || typeBuilder instanceof ProductBuilder\n        ? ({\n            tag: 'Product',\n            value: { elements: [] },\n          } as AlgebraicTypeVariants.Product)\n        : ({","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/eddf9f5014579a50d4b67630e28b6e15cad9c4af/crates/bindings-typescript/src/lib/schema.ts#L345-L381","documentation":"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.)","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before\nspacetime publish --parent alice myorg/mydb\n\n# after\nspacetime publish myorg/mydb\n# or\nspacetime publish --parent myorg mydb","handlingStrategy":"validation","validationCode":"if [[ \"$DB_NAME\" == */* && -n \"$PARENT\" && \"$PARENT\" != \"${DB_NAME%%/*}\" ]]; then\n  echo \"conflicting parent: --parent $PARENT vs $DB_NAME\"; exit 1\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["spacetimedb","cli","publish","database-naming","arguments"],"backgroundTag":"conflicting-cli-arguments","analyzedSha":"eddf9f5014579a50d4b67630e28b6e15cad9c4af","analyzedAt":"2026-08-20T06:08:37.179Z","contentChangedAt":"2026-08-20T06:08:37.179Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}