pulumi/pulumi · warning
: does not match a registry package
Error message
%w: %s%s does not match a registry package
What it means
Terminal not-found result for bare (one-segment) package names: no private package, no pulumi/pulumi-published package, and (if any exist) a list of 'suggested' third-party packages with the same name. The error wraps errorSuggestedPackages which itself wraps ErrNotFound, so errors.Is(err, registry.ErrNotFound) holds and GetSuggestedPackages returns the similar packages. The message appends '@version' when a specific version was requested.
Solutions
- Use the fully-qualified source/publisher/name form for third-party packages
- Call GetSuggestedPackages on the error and pick from the suggested list
- Check the package exists on the Pulumi Registry website
- Confirm the exact spelling/casing of the package name
Example fix
// before pkg, err := registry.ResolvePackageFromName(ctx, reg, "mongodbatlas", nil) // after pkg, err := registry.ResolvePackageFromName(ctx, reg, "pulumi/mongodbatlas/mongodbatlas", nil)
Defensive patterns
Strategy: fallback
Validate before calling
// verify the name resolves to a known package before resolving metadata
results := searchRegistry(name)
if len(results.privateMatches) == 0 && len(results.pulumiMatches) == 0 {
return fmt.Errorf("%q only exists under third-party publishers or not at all; use source/publisher/name", name)
} Type guard
func isNotFoundWithSuggestions(err error) bool {
return errors.Is(err, registry.ErrNotFound) && len(registry.GetSuggestedPackages(err)) > 0
} Try / catch
pkg, err := registry.ResolvePackageFromName(ctx, reg, name, ver)
if err != nil && errors.Is(err, registry.ErrNotFound) {
for _, s := range registry.GetSuggestedPackages(err) {
// offer s.Source/s.Publisher/s.Name as an alternative
}
} Prevention
- Use fully-qualified names for community/third-party packages
- Validate names against the Pulumi Registry before automation runs
- Check errors with errors.Is(err, registry.ErrNotFound) and use GetSuggestedPackages for UX
- Watch the '@version' suffix in the message to notice version-scoped misses
When it happens
Trigger: ResolvePackageFromName called with a name like 'aws' or 'mytool' where the registry search returns no private or pulumi-official match — the name only exists under third-party publishers, or doesn't exist at all; also when the requested semver doesn't match after a candidate was found... (for the no-candidate case specifically: zero private and zero pulumi matches).
Common situations: Typo in a package name; referencing a community package (e.g. a third-party publisher's package) by bare name when only the fully-qualified form resolves; requesting a name that was never published; offline or restricted registry search returning empty results.
Related errors
- could not resolve
- is ambiguous, it matches both / / and other packages
- is ambiguous, it matches both / / and / /
- Private Registry is not supported by diy backends
- registry.Mock.ListTemplatesF not implemented
AI-assisted analysis of pulumi/pulumi@793f7b2e16 (2026-08-31).
Data as JSON: /api/errors/12e2a523bb1ebac7.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/registry/resolve.go:144
packages: []apitype.PackageMetadata{meta},
err: ErrNotFound,
},
}
}
return apitype.PackageMetadata{}, err
}
if len(privatePackageMetadata) == 1 {
return applyVersion(privatePackageMetadata[0])
}
if pulumiPackageMetadata != nil {
return applyVersion(*pulumiPackageMetadata)
}
var versionStr string
if version != nil {
versionStr = "@" + version.String()
}
return apitype.PackageMetadata{}, fmt.Errorf(
"%w: %s%s does not match a registry package", errorSuggestedPackages{
packages: suggested,
err: ErrNotFound,
}, name, versionStr)
default:
return apitype.PackageMetadata{}, InvalidIdentifierError{name}
}
}
func GetSuggestedPackages(err error) []apitype.PackageMetadata {
suggestions, _ := errors.AsType[errorSuggestedPackages](err)
return suggestions.packages
}
type errorSuggestedPackages struct {
err error
packages []apitype.PackageMetadata
}View on GitHub (pinned to 793f7b2e16)