clockworklabs/SpacetimeDB · error · TypeError

schema entry '${accName}' must be a table or a submodule nam

Error message

schema entry '${accName}' must be a table or a submodule namespace object

What it means

Error "schema entry '${accName}' must be a table or a submodule namespace object" thrown in clockworklabs/SpacetimeDB.

Source

Thrown at crates/bindings-typescript/src/server/schema.ts:854

    }

    const tableSchemas: Record<string, UntypedTableDef> = {};
    for (const [accName, entry] of Object.entries(entries)) {
      if (entry instanceof Schema) {
        throw new TypeError(
          `schema entry '${accName}' looks like a default import; use \`import * as ${accName} from '...'\` so the submodule can see the library's named reducer exports.`
        );
      }
      if (isSubmoduleNamespace(entry)) {
        const { rawDef, dispatch } =
          entry.default.buildSubmoduleDispatch(entry);
        dispatch.namespace = accName;
        ctx.addSubmodule({ namespace: accName, module: rawDef });
        ctx.submoduleDispatchInfos.push(dispatch);
        continue;
      }
      if (!isUntypedTableSchema(entry)) {
        throw new TypeError(
          `schema entry '${accName}' must be a table or a submodule namespace object`
        );
      }

      const table = entry;
      const tableDef = table.tableDef(ctx, accName);
      tableSchemas[accName] = tableToSchema(accName, table, tableDef);
      const tableSourceNames = ctx.tableSourceNames.get(table);
      if (tableSourceNames === undefined) {
        ctx.tableSourceNames.set(table, [tableDef.sourceName]);
      } else {
        tableSourceNames.push(tableDef.sourceName);
      }
      ctx.moduleDef.tables.push(tableDef);
      if (table.schedule) {
        ctx.pendingSchedules.push({
          table,
          tableName: tableDef.sourceName,

View on GitHub (pinned to 524b4487d9)

When it happens

Trigger: Thrown at crates/bindings-typescript/src/server/schema.ts:854 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of clockworklabs/SpacetimeDB@524b4487d9 (2026-08-16). Data as JSON: /api/errors/2a08e5f63e7f566c. Report an issue: GitHub.