badges/shields · error · NotFound
port not found
Error message
port not found
What it means
The vcpkg version badge handle() catches NotFound errors raised while fetching or parsing the port manifest (e.g. GitHub 404 for ports/<name>/vcpkg.json) and rethrows them as a user-facing NotFound with 'port not found'. It means the requested port name does not correspond to a manifest file in the vcpkg repository. Other errors are rethrown unchanged.
Source
Thrown at services/vcpkg/vcpkg-version.service.js:63
static render({ version }) {
return renderVersionBadge({ version })
}
async handle({ portName }) {
try {
const manifest = await fetchJsonFromRepo(this, {
schema: vcpkgManifestSchema,
user: 'microsoft',
repo: 'vcpkg',
branch: 'master',
filename: `ports/${portName}/vcpkg.json`,
})
const version = parseVersionFromVcpkgManifest(manifest)
return this.constructor.render({ version })
} catch (error) {
if (error instanceof NotFound) {
throw new NotFound({
prettyMessage: 'port not found',
})
}
throw error
}
}
}
View on GitHub (pinned to 766fd8bc89)
Solutions
- Check the port name spelling and confirm it exists at ports/<name>/vcpkg.json in microsoft/vcpkg.
- Search the vcpkg registry for the current name (ports get renamed/removed).
- If the port lives in a custom registry, the badge (which reads the microsoft/vcpkg repo) cannot serve it.
Example fix
// before /badge/vcpkg/v/mypkg // after /badge/vcpkg/v/my-actual-port-name
Defensive patterns
Strategy: validation
Validate before calling
const exists = await fetch(`https://raw.githubusercontent.com/microsoft/vcpkg/master/ports/${portName}/vcpkg.json`, { method: 'HEAD' }); if (!exists.ok) throw new Error('port does not exist in microsoft/vcpkg') Try / catch
try { renderBadge() } catch (e) { if (e instanceof NotFound && e.prettyMessage === 'port not found') return 'unknown port'; throw e } Prevention
- Check the port exists at ports/<name>/vcpkg.json in microsoft/vcpkg before embedding the badge.
- Track vcpkg port renames/removals if you maintain many badges.
- Note the badge only reads the microsoft/vcpkg registry, not custom registries.
When it happens
Trigger: Requesting a vcpkg version badge with a portName for which the raw manifest fetch returns 404/NotFound; also triggered if a downstream NotFound bubbles up during manifest parsing.
Common situations: Typo in the port name; the port was removed or renamed in the vcpkg registry; using a port that exists only in a custom registry not covered by the badge.
Related errors
AI-assisted analysis of badges/shields@766fd8bc89 (2026-08-30).
Data as JSON: /api/errors/4cde3d6001932469.
Report an issue: GitHub.