{"record":{"id":"cc2b02a43c661484","repo":"clockworklabs/SpacetimeDB","slug":"exporting-something-that-is-not-a-spacetime-export","errorCode":null,"errorMessage":"exporting something that is not a spacetime export","messagePattern":"exporting something that is not a spacetime export","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"crates/bindings-typescript/src/server/schema.ts","lineNumber":821,"sourceCode":"}\n\nfunction registerModuleExports(\n  schema: SchemaInner,\n  exports: object,\n  opts?: { ignoreNonModuleExports?: boolean }\n) {\n  if (schema.exportsRegistered) {\n    return;\n  }\n  schema.exportsRegistered = true;\n\n  for (const [name, moduleExport] of Object.entries(exports)) {\n    if (name === 'default') continue;\n    if (!isModuleExport(moduleExport)) {\n      if (opts?.ignoreNonModuleExports) {\n        continue;\n      }\n      throw new TypeError('exporting something that is not a spacetime export');\n    }\n    checkExportContext(moduleExport, schema);\n    moduleExport[registerExport](schema, name);\n  }\n}\n\nexport function schema<const H extends Record<string, SchemaEntry>>(\n  entries: H,\n  moduleSettings?: ModuleSettings\n): Schema<SchemaDefForEntries<H>> {\n  const ctx = new SchemaInner<SchemaDefForEntries<H>>(ctx => {\n    // Apply module settings.\n    if (moduleSettings?.CASE_CONVERSION_POLICY != null) {\n      ctx.setCaseConversionPolicy(moduleSettings.CASE_CONVERSION_POLICY);\n    }\n\n    const tableSchemas: Record<string, UntypedTableDef> = {};\n    for (const [accName, entry] of Object.entries(entries)) {","sourceCodeStart":803,"sourceCodeEnd":839,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/bindings-typescript/src/server/schema.ts#L803-L839","documentation":"Error \"exporting something that is not a spacetime export\" thrown in clockworklabs/SpacetimeDB.","triggerScenarios":"Thrown at crates/bindings-typescript/src/server/schema.ts:821 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"524b4487d949b61a07d4f39c862d1290259dfd20","analyzedAt":"2026-08-16T23:58:54.611Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}