siyuan-note/siyuan · error
multiple marketplace package manifests found
Error message
multiple marketplace package manifests found
What it means
ExtractLocalPackage scans the extracted package root for exactly one of plugin.json, theme.json, icon.json, template.json, or widget.json. If a regular file matching two or more of these manifest names exists in the same root, it cannot decide the package type and throws this error. The temp extraction is cleaned up before returning.
Solutions
- Remove all manifest files from the package root except the one matching the intended package type
- Repackage the zip with only one manifest (plugin.json XOR theme.json XOR icon.json XOR template.json XOR widget.json)
- Check .gitignore/build scripts so other projects' manifests are not copied into the output
Example fix
// before: package root contains plugin.json AND theme.json // after: my-plugin/ plugin.json index.js ...
Defensive patterns
Strategy: validation
Validate before calling
const allowed = ["plugin.json","theme.json","icon.json","template.json","widget.json"];
const found = allowed.filter(f => fs.existsSync(path.join(pkgRoot, f)) && fs.statSync(path.join(pkgRoot, f)).isFile());
if (found.length !== 1) throw new Error("package must contain exactly one manifest, found: " + found.join(",")); Prevention
- Keep exactly one manifest per package directory
- Check the zip listing before distributing
- Clean stale manifests from build output
When it happens
Trigger: Calling ExtractLocalPackage (or InstallLocalBazaarPackage) on a zip whose package root contains e.g. both plugin.json and theme.json as regular files.
Common situations: A developer merges several package types into one directory before packaging; a zip accidentally bundles manifest files left over from another project; CI copies multiple manifests into the build output.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- invalid marketplace package manifest
- marketplace package manifest not found
- marketplace package manifest not found or invalid
- marketplace package name mismatch: expected
- 199
AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19).
Data as JSON: /api/errors/9ffd13dd706e04f5.
Report an issue: GitHub.
Appendix: source
Thrown at kernel/bazaar/local.go:67
tempPath := filepath.Join(util.TempDir, "bazaar", "local", gulu.Rand.String(7))
cleanup = func() { _ = os.RemoveAll(tempPath) }
if err = extractLocalPackageArchive(archivePath, tempPath); err != nil {
cleanup()
return
}
packagePath, err = localPackageRoot(tempPath)
if err != nil {
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()
}View on GitHub (pinned to 9f775e8a12)