{"record":{"id":"92f8213c4a1b36d3","repo":"clockworklabs/SpacetimeDB","slug":"schema-entry-accname-looks-like-a-default-imp","errorCode":null,"errorMessage":"schema entry '${accName}' looks like a default import; use `import * as ${accName} from '...'` so the submodule can see the library's named reducer exports.","messagePattern":"schema entry '(.+?)' looks like a default import; use `import \\* as (.+?) from '\\.\\.\\.'` so the submodule can see the library's named reducer exports\\.","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"crates/bindings-typescript/src/server/schema.ts","lineNumber":841,"sourceCode":"    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)) {\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;","sourceCodeStart":823,"sourceCodeEnd":859,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/bindings-typescript/src/server/schema.ts#L823-L859","documentation":"Error \"schema entry '${accName}' looks like a default import; use `import * as ${accName} from '...'` so the submodule can see the library's named reducer exports.\" thrown in clockworklabs/SpacetimeDB.","triggerScenarios":"Thrown at crates/bindings-typescript/src/server/schema.ts:841 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"}