clockworklabs/SpacetimeDB · error · TypeError

exporting something that is not a spacetime export

Error message

exporting something that is not a spacetime export

What it means

Error "exporting something that is not a spacetime export" thrown in clockworklabs/SpacetimeDB.

Source

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

}

function registerModuleExports(
  schema: SchemaInner,
  exports: object,
  opts?: { ignoreNonModuleExports?: boolean }
) {
  if (schema.exportsRegistered) {
    return;
  }
  schema.exportsRegistered = true;

  for (const [name, moduleExport] of Object.entries(exports)) {
    if (name === 'default') continue;
    if (!isModuleExport(moduleExport)) {
      if (opts?.ignoreNonModuleExports) {
        continue;
      }
      throw new TypeError('exporting something that is not a spacetime export');
    }
    checkExportContext(moduleExport, schema);
    moduleExport[registerExport](schema, name);
  }
}

export function schema<const H extends Record<string, SchemaEntry>>(
  entries: H,
  moduleSettings?: ModuleSettings
): Schema<SchemaDefForEntries<H>> {
  const ctx = new SchemaInner<SchemaDefForEntries<H>>(ctx => {
    // Apply module settings.
    if (moduleSettings?.CASE_CONVERSION_POLICY != null) {
      ctx.setCaseConversionPolicy(moduleSettings.CASE_CONVERSION_POLICY);
    }

    const tableSchemas: Record<string, UntypedTableDef> = {};
    for (const [accName, entry] of Object.entries(entries)) {

View on GitHub (pinned to 524b4487d9)

When it happens

Trigger: Thrown at crates/bindings-typescript/src/server/schema.ts:821 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/cc2b02a43c661484. Report an issue: GitHub.