siyuan-note/siyuan · error
marketplace package manifest not found
Error message
marketplace package manifest not found
What it means
Returned by ExtractLocalPackage (kernel/bazaar/local.go:75-78) when no manifest file is found in the extracted package directory. After iterating all five manifest file names (plugin.json, theme.json, icon.json, template.json, widget.json), if none exists as a regular file, the package type is unknown and extraction is aborted with cleanup.
Source
Thrown at kernel/bazaar/local.go:76
cleanup()
return
}
var manifestPath string
for manifestName, packageType := range localPackageManifests {
candidate := filepath.Join(packagePath, manifestName)
if info, statErr := os.Stat(candidate); statErr == nil && info.Mode().IsRegular() {
if manifestPath != "" {
err = errors.New("multiple marketplace package manifests found")
cleanup()
return
}
pkgType = packageType
manifestPath = candidate
}
}
if manifestPath == "" {
err = errors.New("marketplace package manifest not found")
cleanup()
return
}
pkg, err = ParsePackageJSON(manifestPath)
if err != nil || pkg == nil {
err = errors.New("invalid marketplace package manifest")
cleanup()
}
return
}
func extractLocalPackageArchive(archivePath, destination string) error {
reader, err := zip.OpenReader(archivePath)
if err != nil {
return errors.New("invalid marketplace package archive")
}
defer reader.Close()View on GitHub (pinned to 251596fc0d)
Solutions
- Add the correct manifest file (plugin.json, theme.json, icon.json, template.json, or widget.json) to the package root
- Ensure the manifest is at the archive root or inside the single top-level directory
- Check the manifest filename spelling against localPackageManifests in kernel/bazaar/local.go:39-45
- Flatten the zip structure if manifests are nested more than one level deep
Defensive patterns
Strategy: validation
Validate before calling
func hasAnyManifest(packagePath string) bool {
manifests := []string{"plugin.json", "theme.json", "icon.json", "template.json", "widget.json"}
for _, m := range manifests {
if info, err := os.Stat(filepath.Join(packagePath, m)); err == nil && info.Mode().IsRegular() {
return true
}
}
return false
}
// Ensure hasAnyManifest returns true before calling ExtractLocalPackage Prevention
- Verify the manifest file exists at the package root or in the single top-level directory before zipping
- Check the manifest filename spelling: plugin.json (not plugins.json), theme.json, icon.json, template.json, widget.json
- Flatten nested directory structures so the manifest is discoverable by localPackageRoot
When it happens
Trigger: Uploading a local marketplace package zip whose root directory (or its single top-level subdirectory) contains none of the five recognized manifest files.
Common situations: Package author forgot to include the manifest; manifest is in a nested subdirectory rather than the root; manifest filename is misspelled (e.g. plugins.json instead of plugin.json); zip structure nests files too deeply for localPackageRoot to find.
Related errors
- multiple marketplace package manifests found
- invalid marketplace package manifest
- marketplace package manifest not found or invalid
- invalid marketplace package archive
- invalid marketplace package type
AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12).
Data as JSON: /api/errors/3b68595da816d8f3.
Report an issue: GitHub.