router-for-me/CLIProxyAPI · error

home plugins: goarch is required

Error message

home plugins: goarch is required

What it means

Error "home plugins: goarch is required" thrown in router-for-me/CLIProxyAPI.

Solutions

  1. Set the goarch value (target architecture) before syncing home plugins.
  2. Verify the runtime architecture detection or provide the value explicitly.

When it happens

Trigger: Thrown at internal/homeplugins/sync.go:138 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of router-for-me/CLIProxyAPI@78f0c4079e (2026-08-15). Data as JSON: /api/errors/51a6ab39550b9a35. Report an issue: GitHub.

Appendix: source

Thrown at internal/homeplugins/sync.go:138

}

func SyncWithReport(ctx context.Context, cfg *config.Config, pluginRuntime PluginRuntime) (SyncReport, error) {
	return SyncPlatformWithReport(ctx, cfg, pluginRuntime, CurrentPlatform())
}

func SyncPlatformWithReport(ctx context.Context, cfg *config.Config, pluginRuntime PluginRuntime, platform Platform) (SyncReport, error) {
	if cfg == nil || !cfg.Home.Enabled || !cfg.Plugins.Enabled {
		return newSyncReport(platform), nil
	}
	platform = NormalizePlatform(platform)
	report := newSyncReport(platform)
	if platform.GOOS == "" {
		errPlatform := fmt.Errorf("home plugins: goos is required")
		finishReport(&report, errPlatform)
		return report, errPlatform
	}
	if platform.GOARCH == "" {
		errPlatform := fmt.Errorf("home plugins: goarch is required")
		finishReport(&report, errPlatform)
		return report, errPlatform
	}
	report.Platform = platform
	root, errResolvePluginsDir := config.ResolvePluginsDir(cfg.Plugins.Dir)
	if errResolvePluginsDir != nil {
		errPluginsDir := fmt.Errorf("home plugins: %w", errResolvePluginsDir)
		finishReport(&report, errPluginsDir)
		return report, errPluginsDir
	}
	client := newPluginStoreClient(cfg)
	var syncErrors []error
	ids := make([]string, 0, len(cfg.Plugins.Configs))
	for id := range cfg.Plugins.Configs {
		ids = append(ids, id)
	}
	sort.Strings(ids)
	for _, id := range ids {

View on GitHub (pinned to 78f0c4079e)