{"record":{"id":"1e5ff860676ab6fc","repo":"clockworklabs/SpacetimeDB","slug":"project-path-does-not-exist","errorCode":null,"errorMessage":"Project path does not exist: {}","messagePattern":"Project path does not exist: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/subcommands/publish.rs","lineNumber":542,"sourceCode":"        let dotnet_version = if command_config.is_from_cli(\"dotnet_version\") {\n            command_config.get_one::<u8>(\"dotnet_version\")?\n        } else {\n            let dotnet_version = command_config.get_one::<String>(\"dotnet_version\")?;\n            parse_optional_dotnet_version(dotnet_version.as_deref())?\n        };\n\n        // If the user didn't specify an identity and we didn't specify an anonymous identity, then\n        // we want to use the default identity\n        // TODO(jdetter): We should maybe have some sort of user prompt here for them to be able to\n        //  easily create a new identity with an email\n        let auth_header = get_auth_header(config, anon_identity, server, !yes.skip_login).await?;\n\n        let (name_or_identity, parent) = validate_name_and_parent(name_or_identity, parent)?;\n\n        if let Some(path_to_project) = path_to_project.as_ref()\n            && !path_to_project.exists()\n        {\n            return Err(anyhow::anyhow!(\n                \"Project path does not exist: {}\",\n                path_to_project.display()\n            ));\n        }\n\n        // Decide program file path and read program.\n        // Optionally build the program.\n        let (path_to_program, host_type) = if let Some(path) = wasm_file {\n            println!(\"(WASM) Skipping build. Instead we are publishing {}\", path.display());\n            (path.clone(), \"Wasm\")\n        } else if let Some(path) = js_file {\n            println!(\"(JS) Skipping build. Instead we are publishing {}\", path.display());\n            (path.clone(), \"Js\")\n        } else {\n            build::exec_with_argstring(\n                path_to_project\n                    .as_ref()\n                    .expect(\"path_to_project must exist when publishing from source\"),","sourceCodeStart":524,"sourceCodeEnd":560,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/cli/src/subcommands/publish.rs#L524-L560","documentation":"publish validates that the resolved project path exists on disk before building, and errors out with the offending path otherwise (publish.rs:542). The path comes from --project-path on the CLI or the project-path/module-path setting in spacetime.json.","triggerScenarios":"`spacetime publish --project-path ./missing`, or a spacetime.json project-path that no longer resolves from the current working directory.","commonSituations":"Wrong working directory (relative paths silently changing meaning); stale paths in spacetime.json after moving or renaming the project; typos; deleted build directories.","solutions":["Verify the path exists: `ls <path>`","Use an absolute path, or run publish from the module directory","Fix the project-path/module-path field in spacetime.json","Recreate the directory or regenerate the project if it was deleted"],"exampleFix":"// before\nspacetime publish --project-path ./server\n// after\nspacetime publish --project-path /abs/path/to/server","handlingStrategy":"validation","validationCode":"[ -e \"$PROJECT_PATH\" ] || { echo \"no such path: $PROJECT_PATH\" >&2; exit 2; }\nspacetime publish --project-path \"$PROJECT_PATH\"","typeGuard":"fn project_path_exists(p: &std::path::Path) -> bool { p.exists() }","tryCatchPattern":null,"preventionTips":["Prefer absolute paths for --project-path in scripts","Fix project-path in spacetime.json after moving a project","Verify the working directory before relative-path publishes"],"tags":["publish","project-path","file-not-found"],"backgroundTag":"path-not-found","analyzedSha":"524b4487d949b61a07d4f39c862d1290259dfd20","analyzedAt":"2026-08-16T23:58:54.611Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}