{"record":{"id":"2a08e5f63e7f566c","repo":"clockworklabs/SpacetimeDB","slug":"schema-entry-accname-must-be-a-table-or-a-sub","errorCode":null,"errorMessage":"schema entry '${accName}' must be a table or a submodule namespace object","messagePattern":"schema entry '(.+?)' must be a table or a submodule namespace object","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"crates/bindings-typescript/src/server/schema.ts","lineNumber":854,"sourceCode":"    }\n\n    const tableSchemas: Record<string, UntypedTableDef> = {};\n    for (const [accName, entry] of Object.entries(entries)) {\n      if (entry instanceof Schema) {\n        throw new TypeError(\n          `schema entry '${accName}' looks like a default import; use \\`import * as ${accName} from '...'\\` so the submodule can see the library's named reducer exports.`\n        );\n      }\n      if (isSubmoduleNamespace(entry)) {\n        const { rawDef, dispatch } =\n          entry.default.buildSubmoduleDispatch(entry);\n        dispatch.namespace = accName;\n        ctx.addSubmodule({ namespace: accName, module: rawDef });\n        ctx.submoduleDispatchInfos.push(dispatch);\n        continue;\n      }\n      if (!isUntypedTableSchema(entry)) {\n        throw new TypeError(\n          `schema entry '${accName}' must be a table or a submodule namespace object`\n        );\n      }\n\n      const table = entry;\n      const tableDef = table.tableDef(ctx, accName);\n      tableSchemas[accName] = tableToSchema(accName, table, tableDef);\n      const tableSourceNames = ctx.tableSourceNames.get(table);\n      if (tableSourceNames === undefined) {\n        ctx.tableSourceNames.set(table, [tableDef.sourceName]);\n      } else {\n        tableSourceNames.push(tableDef.sourceName);\n      }\n      ctx.moduleDef.tables.push(tableDef);\n      if (table.schedule) {\n        ctx.pendingSchedules.push({\n          table,\n          tableName: tableDef.sourceName,","sourceCodeStart":836,"sourceCodeEnd":872,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/bindings-typescript/src/server/schema.ts#L836-L872","documentation":"Error \"schema entry '${accName}' must be a table or a submodule namespace object\" thrown in clockworklabs/SpacetimeDB.","triggerScenarios":"Thrown at crates/bindings-typescript/src/server/schema.ts:854 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"}