vectordotdev/vector · error

No / directory at . Run this from the Vector repo root.

Error message

No {CHANGELOG_DIR}/ directory at {}. Run this from the Vector repo root.

What it means

`vdev check changelog-fragments` validates PR changelog fragments against the git diff. It first resolves the repo root and bails when a `changelog.d/` directory does not exist there, since the whole check depends on that directory.

Solutions

  1. cd to the Vector repository root (the directory containing changelog.d/) and re-run
  2. Verify `ls changelog.d` succeeds in your working context
  3. If the directory is genuinely missing, restore it (`git checkout -- changelog.d`) or add it with a README.md

Example fix

# before (wrong dir)
~/some-subdir$ vdev check changelog-fragments
# after
cd ~/vector && vdev check changelog-fragments
Defensive patterns

Strategy: validation

Validate before calling

if (!fs.existsSync(path.join(repoRoot, "changelog.d"))) throw new Error("run from Vector repo root");

Try / catch

try { runCheck(); } catch (e) { if (/No changelog.d\/ directory/.test(e.message)) process.chdir(findVectorRoot()); runCheck(); }

Prevention

When it happens

Trigger: Running the check outside the Vector repository root (or anywhere its find_repo_root result lacks a `changelog.d/` directory), e.g. from a subproject, a bare checkout without changelog.d, or after that directory was deleted/renamed.

Common situations: Running vdev from the wrong working directory in CI; checking out only a subdirectory; an old branch from before changelog.d existed; a typo'd repo path.

Related errors


AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16). Data as JSON: /api/errors/1fb7115da4eabe71. Report an issue: GitHub.

Appendix: source

Thrown at vdev/src/commands/check/changelog_fragments.rs:36

/// Validate changelog fragments added on this branch/PR.
#[derive(clap::Args, Debug)]
#[command()]
pub struct Cli {
    /// Merge base to diff against.
    #[arg(long, default_value = "origin/master")]
    merge_base: String,

    /// Maximum number of fragments accepted in a single PR.
    #[arg(long, default_value_t = DEFAULT_MAX_FRAGMENTS)]
    max_fragments: usize,
}

impl Cli {
    pub fn exec(self) -> Result<()> {
        let repo_root = paths::find_repo_root()?;
        let changelog_dir = repo_root.join(CHANGELOG_DIR);
        if !changelog_dir.is_dir() {
            bail!(
                "No {CHANGELOG_DIR}/ directory at {}. Run this from the Vector repo root.",
                repo_root.display()
            );
        }

        // The gate "did the PR add a new fragment?" uses A (added) only — modifying an
        // existing on-master fragment doesn't count toward the required changelog entry.
        // Schema validation, on the other hand, must see M (modified) fragments too.
        let is_real_fragment =
            |p: &PathBuf| p.file_name().and_then(|s| s.to_str()) != Some("README.md");
        let added_real: Vec<PathBuf> = diff_fragments(&self.merge_base, "A")?
            .into_iter()
            .filter(is_real_fragment)
            .collect();
        if added_real.is_empty() {
            bail!(
                "No changelog fragments detected. \
                 If no changes necessitate user-facing explanations, add the 'no-changelog' label. \

View on GitHub (pinned to bdb87aeaa4)