clockworklabs/SpacetimeDB · error · anyhow::Error
The module pulls in 2 different versions of the `spacetimedb
Error message
The module pulls in 2 different versions of the `spacetimedb/server` package
What it means
Error "The module pulls in 2 different versions of the `spacetimedb/server` package" thrown in clockworklabs/SpacetimeDB.
Source
Thrown at crates/cli/src/tasks/javascript.rs:274
}
let bundle_assets = bundle_result.ok_or(ExitWithCode::FAILURE)?;
let output_chunk = bundle_assets
.into_iter()
.find_map(|chunk| match chunk {
rolldown_common::Output::Chunk(chunk) if chunk.is_entry && chunk.filename == "bundle.js" => Some(chunk),
_ => None,
})
.expect("there should be an output chunk");
let sys_imports = output_chunk.imports.iter().filter_map(|spec| {
let (maj, min) = spec.strip_prefix("spacetime:sys@")?.split_once('.')?;
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(...);`"
);
}
View on GitHub (pinned to 524b4487d9)
When it happens
Trigger: Thrown at crates/cli/src/tasks/javascript.rs:274 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/1a0b5600a356113e.
Report an issue: GitHub.