siyuan-note/siyuan · error
marketplace package is incompatible
Error message
marketplace package is incompatible
What it means
ErrLocalBazaarPackageIncompatible is a sentinel error returned when the package requires a newer SiYuan kernel version than the running app (MinAppVersion check), or when its frontend compatibility check fails (IsIncompatiblePlugin/IsIncompatibleTheme for the current frontend). It may be wrapped with a '%w: SiYuan X or later is required' message. The API layer maps it to reason "package-incompatible".
Source
Thrown at kernel/model/bazaar.go:112
}
// ThemeInstallOptions 描述新安装主题后需要应用的外观模式
type ThemeInstallOptions struct {
Mode int
ModeOS bool
}
// LocalBazaarPackageInstallResult 描述本地集市包的识别和安装结果。
type LocalBazaarPackageInstallResult struct {
PackageType string `json:"packageType"`
PackageName string `json:"packageName"`
MinAppVersion string `json:"minAppVersion,omitempty"`
Updated bool `json:"updated"`
}
var (
ErrLocalBazaarPackageExists = errors.New("marketplace package already exists")
ErrLocalBazaarPackageIncompatible = errors.New("marketplace package is incompatible")
localBazaarInstallLock sync.Mutex
)
// updatePackages 更新一组集市包;同类型批量更新时,安装后处理只执行一次
func updatePackages(packages []*UpdatedPackage, pkgType string, successCount, failedCount *int, planned int) {
items := make([]batchInstallItem, 0, len(packages))
for _, updated := range packages {
pkg := updated.Available
meta, err := installBazaarPackage(pkgType, pkg.RepoURL, pkg.RepoHash, pkg.RepoRef, pkg.Name)
if err != nil {
logging.LogErrorf("update %s [%s] failed: %s", pkgType, pkg.Name, err)
util.PushErrMsg(fmt.Sprintf(Conf.language(238), pkg.Name), 5000)
*failedCount++
continue
}
items = append(items, batchInstallItem{name: pkg.Name, meta: meta})
*successCount++
util.PushEndlessProgress(fmt.Sprintf(Conf.language(236), *successCount+*failedCount, planned, pkg.Name))View on GitHub (pinned to 8641553a1f)
Solutions
- Upgrade SiYuan to at least the version stated in the wrapped error message (MinAppVersion)
- Pick a package version whose minAppVersion is satisfied by the running app
- For frontend incompatibility, use the package on a supported frontend (desktop/mobile) or choose an alternative package
- Check errors.Is(err, model.ErrLocalBazaarPackageIncompatible) and surface 'requires SiYuan >= X' to the user instead of a generic failure
Defensive patterns
Strategy: try-catch
Validate before calling
const appVer = window.siyuan?.config?.appVersion ?? kernelVersion;
const manifest = JSON.parse(readFileSync(path.join(src, "plugin.json"), "utf8"));
if (manifest.minAppVersion && compareVersions(appVer, manifest.minAppVersion) < 0) {
alert(`requires SiYuan >= ${manifest.minAppVersion}`);
} Try / catch
try {
await model.InstallLocalBazaarPackage(src, pkgType, frontend, overwrite);
} catch (err) {
if (errors.Is(err, model.ErrLocalBazaarPackageIncompatible)) {
showUpgradePrompt(err) // message includes 'SiYuan X or later is required'
}
} Prevention
- Compare the package's minAppVersion against the running kernel before installing
- Check the package's bazaar metadata for frontend compatibility (desktop vs mobile)
- Keep SiYuan up to date when installing packages from active development branches
- Avoid reinstalling local packages after an app downgrade without rechecking compatibility
When it happens
Trigger: InstallLocalBazaarPackage with a package whose plugin.json/theme.json declares minAppVersion greater than the running kernel version, or whose bazaar metadata marks it incompatible with the current frontend (desktop vs mobile, or an unsupported frontend mode).
Common situations: Installing a plugin built for a newer SiYuan release into an older app; installing a desktop-only plugin on mobile; downgrading SiYuan while previously compatible packages are reinstalled from local sources; stale bazaar metadata cached after an app upgrade.
Understand the failure class
Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.
Related errors
- %w: SiYuan %s or later is required
- invalid bazaar index schema: %d
- unsupported AI editor actions version [%d]
- unsupported encrypted asset container version
- the document spec is too new
AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11).
Data as JSON: /api/errors/171d94d3b617f5fb.
Report an issue: GitHub.