{"record":{"id":"39d2a558b94bf06e","repo":"clockworklabs/SpacetimeDB","slug":"cannot-continue-without-a-module-path","errorCode":null,"errorMessage":"Cannot continue without a module path.","messagePattern":"Cannot continue without a module path\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/cli/src/subcommands/dev.rs","lineNumber":250,"sourceCode":"                    lc.loaded_files\n                        .iter()\n                        .map(|f| strip_verbatim_prefix(f).display().to_string())\n                        .collect::<Vec<_>>()\n                        .join(\", \")\n                })\n                .unwrap_or_else(|| \"spacetime.json\".to_string());\n            println!(\"{} {}\", \"Found config files:\".yellow().bold(), files.dimmed());\n            println!(\n                \"{}\",\n                \"Could not determine module path because no `module-path` was found and `./spacetimedb` does not exist.\"\n                    .yellow()\n            );\n            let should_provide = Confirm::new()\n                .with_prompt(\"Would you like to provide --module-path now?\")\n                .default(true)\n                .interact()?;\n            if !should_provide {\n                anyhow::bail!(\"Cannot continue without a module path.\");\n            }\n\n            let config_dir = loaded_config\n                .as_ref()\n                .map(|lc| lc.config_dir.clone())\n                .ok_or_else(|| anyhow::anyhow!(\"Missing loaded config directory\"))?;\n\n            let provided_module_path: String = Input::with_theme(&ColorfulTheme::default())\n                .with_prompt(\"Module path\")\n                .default(\"spacetimedb\".to_string())\n                .validate_with({\n                    let config_dir = config_dir.clone();\n                    move |input: &String| -> Result<(), String> {\n                        let candidate = PathBuf::from(input);\n                        let resolved = if candidate.is_absolute() {\n                            candidate\n                        } else {\n                            config_dir.join(&candidate)","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/cli/src/subcommands/dev.rs#L232-L268","documentation":"During `spacetime dev`, when no module path could be determined (no `module-path` in config and no `./spacetimedb` directory), the CLI interactively asks `Would you like to provide --module-path now?`. Answering 'no' makes the command bail because a module source path is mandatory for the dev loop — there is nothing to watch, build, or publish without it.","triggerScenarios":"Running `spacetime dev` in a directory that has some config files but no `module-path` field and no `./spacetimedb` folder, then answering `n` at the `--module-path` prompt.","commonSituations":"Starting dev mode in a client-only repo; a `spacetime.json` edited to remove `module-path`; reorganizing the module into a differently named folder without updating config.","solutions":["Re-run and answer `y` at the prompt, accepting or editing the default `spacetimedb` path","Create the module directory so it is auto-detected: `mkdir spacetimedb` and add module sources there","Add `module-path` to `spacetime.json` (or pass `--module-path spacetimedb`) so the prompt never appears","If the module lives elsewhere, pass its path: `spacetime dev --module-path path/to/module`"],"exampleFix":"# before\nWould you like to provide --module-path now? > n\n# after\nspacetime dev --module-path crates/server  # or answer y at the prompt","handlingStrategy":"validation","validationCode":"# Ensure the module dir exists so the prompt is skipped\n[ -d ./spacetimedb ] || { echo \"create ./spacetimedb or set module-path\"; exit 1; }\nspacetime dev","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always commit a module-path (or the spacetimedb/ dir) to the repo","Pass `--module-path` non-interactively in scripts"],"tags":["cli","interactive","module-path","spacetimedb"],"backgroundTag":"missing-required-parameter","analyzedSha":"524b4487d949b61a07d4f39c862d1290259dfd20","analyzedAt":"2026-08-16T23:58:54.611Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}