BoundaryML/baml · error · ManifestError
{path}: `[package]` is missing `name = "<your-project-name>"
Error message
{path}: `[package]` is missing `name = "<your-project-name>"`. What it means
A `ManifestError` variant. The manifest has a `[package]` table but it lacks the required `name` key, so the package's identity cannot be resolved. The message names the file and shows the expected syntax `name = "<your-project-name>"`.
Source
Thrown at baml_language/crates/baml_db/src/manifest.rs:187
pub max_typed_union_arity: Option<Spanned<i64>>,
#[serde(flatten)]
pub unknown: IndexMap<String, toml::Value>,
}
/// Parse `baml.toml` text into the typed manifest.
pub fn parse(content: &str) -> Result<BamlToml, toml::de::Error> {
toml::from_str(content)
}
/// Why a manifest's `[package].name` could not be resolved.
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
pub enum ManifestError {
#[error(
"{path}: missing `[package]` table.\nAdd:\n\n [package]\n name = \"<your-project-name>\"\n"
)]
MissingPackageTable { path: std::path::PathBuf },
#[error("{path}: `[package]` is missing `name = \"<your-project-name>\"`.")]
MissingPackageName { path: std::path::PathBuf },
#[error("{path}: `[package].name` cannot be empty.")]
EmptyPackageName { path: std::path::PathBuf },
#[error(
"{path}: `[dependencies]` is not supported in a project manifest yet: package imports are \
pending a design pass. Remove the table; a project reaches the standard library implicitly."
)]
DependenciesUnsupported { path: std::path::PathBuf },
#[error(
"{path}: `[package].prelude` is reserved for the standard library's own manifests. Remove it."
)]
PreludeUnsupported { path: std::path::PathBuf },
}
/// Refuse the manifest tables only the standard library's own manifests may
/// carry. Package imports are not user surface area until they get a design
/// pass, so a project manifest with `[dependencies]` (or the stdlib-only
/// `[package].prelude`) is an error, not a silently ignored table.View on GitHub (pinned to bd85ce9dee)
Solutions
- Add `name = "<your-project-name>"` inside the `[package]` table at the reported path.
- Choose a non-empty, valid package name.
- Re-run the load to confirm the manifest now resolves.
Example fix
// before [package] version = "0.1.0" // after [package] name = "my-project" version = "0.1.0"
Defensive patterns
Strategy: try-catch
Validate before calling
fn manifest_has_name(raw: &str) -> bool {
raw.parse::<toml::Value>().ok()
.and_then(|v| v.get("package")?.get("name").cloned())
.is_some()
} Try / catch
match load_manifest(path) {
Err(ManifestError::MissingPackageName { path }) => eprintln!("{path:?}: [package] needs name = \"...\""),
Err(e) => eprintln!("manifest error: {e}"),
Ok(m) => m,
} Prevention
- Treat `name` as mandatory whenever editing the [package] table.
- Check merge diffs for accidentally deleted manifest keys.
- Template generators should always emit the name field.
When it happens
Trigger: Loading a manifest whose `[package]` table omits `name` — e.g. `[package]\nversion = "0.1.0"` with no name.
Common situations: Manually editing the manifest and deleting the name line; scaffolding tools generating partial tables; merge conflicts that drop a key.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- {path}: missing `[package]` table. Add: [package] n
- {path}: `[package].name` cannot be empty.
- {path}: `[dependencies]` is not supported in a project manif
- {} uses reserved table `[__baml_codegen]`; remove it because
- {path}: `[package].prelude` is reserved for the standard lib
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/78601f0aa8de9121.
Report an issue: GitHub.