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
- Open hve-core in a fresh codespace or devcontainer
- Run
npm run lint:frontmatter
- 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
Description
Running
npm run lint:frontmatterin a fresh devcontainer fails with:Root Cause
Validate-MarkdownFrontmatter.ps1requires thepowershell-yamlPowerShell module to parse YAML frontmatter, but the devcontainer setup scripts do not install it. Neitheron-create.shnorpost-create.shinclude apowershell-yamlmodule installation step.The
copilot-setup-steps.ymlworkflow installsPowerShell-Yamlfor the Copilot Coding Agent environment, but this is not mirrored in the local devcontainer setup.Reproduction
npm run lint:frontmatterSuggested Fix
Add
powershell-yamlinstallation to.devcontainer/scripts/on-create.shorpost-create.sh:Workaround
pwsh -NoProfile -Command "Install-Module -Name powershell-yaml -Force -Scope CurrentUser -Repository PSGallery"Related Issues
npm run lint:psfails whenlogs/directory does not exist #497 —logs/directory missing in fresh devcontainernpm run lint:yamlfails —actionlintnot installed in devcontainer #498 —actionlintnot installed in devcontainerAll 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