Skip to content

bug: npm run lint:frontmatter fails — powershell-yaml module not installed in devcontainer #499

@andrewDoing

Description

@andrewDoing

Description

Running npm run lint:frontmatter in a fresh devcontainer fails with:

❌ ConvertFrom-Yaml cmdlet not found. Install powershell-yaml module: Install-Module -Name PowerShell-Yaml -Force -Scope CurrentUser

Root Cause

Validate-MarkdownFrontmatter.ps1 requires the powershell-yaml PowerShell module to parse YAML frontmatter, but the devcontainer setup scripts do not install it. Neither on-create.sh nor post-create.sh include a powershell-yaml module installation step.

The copilot-setup-steps.yml workflow installs PowerShell-Yaml for the Copilot Coding Agent environment, but this is not mirrored in the local devcontainer setup.

Reproduction

  1. Open hve-core in a fresh codespace or devcontainer
  2. Run npm run lint:frontmatter
  3. Observe the error

Suggested Fix

Add powershell-yaml installation to .devcontainer/scripts/on-create.sh or post-create.sh:

echo "Installing PowerShell-Yaml module..."
pwsh -NoProfile -Command "Install-Module -Name powershell-yaml -Force -Scope CurrentUser -Repository PSGallery"

Workaround

pwsh -NoProfile -Command "Install-Module -Name powershell-yaml -Force -Scope CurrentUser -Repository PSGallery"

Related Issues

All three issues stem from the same gap: the devcontainer lifecycle scripts do not install all tools required by npm run lint:all.

Affected Scripts

  • scripts/linting/Validate-MarkdownFrontmatter.ps1
  • .devcontainer/scripts/on-create.sh (missing installation)

Environment

  • DevContainer on Ubuntu 24.04
  • PowerShell 7.5.4
  • Node.js 24.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageRequires triage and prioritization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions