{"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":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/subcommands/dev.rs","lineNumber":256,"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":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/3653d2ed498fddbd83b7062aa6bf8970e18635ec/crates/cli/src/subcommands/dev.rs#L238-L274","documentation":"During `spacetime dev`, when no module path can be determined (no --module-path flag, no module-path in config, and no ./spacetimedb directory), the CLI interactively offers to enter one. Declining that prompt aborts the command with this message rather than guessing a location.","triggerScenarios":"Running `spacetime dev` in a directory without a spacetimedb/ dir or configured module path and answering 'No' to 'Would you like to provide --module-path now?' (or hitting EOF in a non-interactive shell).","commonSituations":"Non-interactive terminals where the dialog cannot complete; running from the wrong directory; abandoned first-time setup.","solutions":["Re-run and accept the prompt, or pass --module-path explicitly","Create the module directory (`mkdir spacetimedb`) or set module-path in spacetime.json","Run from the project root or pass --project-path so the default ./spacetimedb resolves"],"exampleFix":"# before\nspacetime dev    # answered 'No' at the --module-path prompt\n\n# after\nspacetime dev --module-path ./spacetimedb","handlingStrategy":"validation","validationCode":"// verify a module path source exists before starting dev\nlet has_module = cli_module_path.is_some()\n    || config.module_path.is_some()\n    || project_dir.join(\"spacetimedb\").exists();\nanyhow::ensure!(has_module, \"no module path: pass --module-path or create ./spacetimedb\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run `spacetime dev` from the project root so ./spacetimedb resolves","Set module-path in spacetime.json for non-interactive environments"],"tags":["cli","dev","module-path","interactive"],"backgroundTag":"missing-required-option","analyzedSha":"3653d2ed498fddbd83b7062aa6bf8970e18635ec","analyzedAt":"2026-08-20T06:08:37.179Z","contentChangedAt":"2026-08-20T06:08:37.179Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}