{"record":{"id":"1a0b5600a356113e","repo":"clockworklabs/SpacetimeDB","slug":"the-module-pulls-in-2-different-versions-of-the-s","errorCode":null,"errorMessage":"The module pulls in 2 different versions of the `spacetimedb/server` package","messagePattern":"The module pulls in 2 different versions of the `spacetimedb/server` package","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/tasks/javascript.rs","lineNumber":274,"sourceCode":"    }\n    let bundle_assets = bundle_result.ok_or(ExitWithCode::FAILURE)?;\n\n    let output_chunk = bundle_assets\n        .into_iter()\n        .find_map(|chunk| match chunk {\n            rolldown_common::Output::Chunk(chunk) if chunk.is_entry && chunk.filename == \"bundle.js\" => Some(chunk),\n            _ => None,\n        })\n        .expect(\"there should be an output chunk\");\n\n    let sys_imports = output_chunk.imports.iter().filter_map(|spec| {\n        let (maj, min) = spec.strip_prefix(\"spacetime:sys@\")?.split_once('.')?;\n        Option::zip(maj.parse::<u16>().ok(), min.parse::<u16>().ok())\n    });\n\n    let mut maj_sys_ver = None;\n    for (maj, _min) in sys_imports {\n        anyhow::ensure!(\n            *maj_sys_ver.get_or_insert(maj) == maj,\n            \"The module pulls in 2 different versions of the `spacetimedb/server` package\"\n        );\n    }\n\n    let maj_sys_ver = maj_sys_ver.context(\n        \"Your module doesn't import the `spacetimedb/server` package at all - \\\n         this is likely a mistake, as your module will not be able to interface \\\n         with the SpacetimeDB host.\",\n    )?;\n\n    if maj_sys_ver == 2 {\n        anyhow::ensure!(\n            output_chunk.exports.contains(&\"default\".into()),\n            \"It seems like you haven't exported your schema. You must `export default schema(...);`\"\n        );\n    }\n","sourceCodeStart":256,"sourceCodeEnd":292,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/cli/src/tasks/javascript.rs#L256-L292","documentation":"Error \"The module pulls in 2 different versions of the `spacetimedb/server` package\" thrown in clockworklabs/SpacetimeDB.","triggerScenarios":"Thrown at crates/cli/src/tasks/javascript.rs:274 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"}