clockworklabs/SpacetimeDB · error · anyhow::Error
It seems like you haven't exported your schema. You must `ex
Error message
It seems like you haven't exported your schema. You must `export default schema(...);`
What it means
Error "It seems like you haven't exported your schema. You must `export default schema(...);`" thrown in clockworklabs/SpacetimeDB.
Source
Thrown at crates/cli/src/tasks/javascript.rs:287
Option::zip(maj.parse::<u16>().ok(), min.parse::<u16>().ok())
});
let mut maj_sys_ver = None;
for (maj, _min) in sys_imports {
anyhow::ensure!(
*maj_sys_ver.get_or_insert(maj) == maj,
"The module pulls in 2 different versions of the `spacetimedb/server` package"
);
}
let maj_sys_ver = maj_sys_ver.context(
"Your module doesn't import the `spacetimedb/server` package at all - \
this is likely a mistake, as your module will not be able to interface \
with the SpacetimeDB host.",
)?;
if maj_sys_ver == 2 {
anyhow::ensure!(
output_chunk.exports.contains(&"default".into()),
"It seems like you haven't exported your schema. You must `export default schema(...);`"
);
}
Ok(project_path.join("dist").join("bundle.js"))
}
View on GitHub (pinned to 524b4487d9)
When it happens
Trigger: Thrown at crates/cli/src/tasks/javascript.rs:287 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/b24564872b562439.
Report an issue: GitHub.