Skip to content

opkg install <local-package-path> --global fails with "Version is required for registry sources" #33

@NatEvory

Description

@NatEvory

Bug

Installing a package from a local filesystem path works in a normal/local scope, but fails in "global" scope with:
Failed to load package: SourceLoadError: Version is required for registry sources

Addendum

it works with a fully qualified path name, but not a relative path name
after a little digging, it looks like the --global flag might change the working directory before evaluating the relative plugin path

Repro steps

Package source
A local package directory (e.g. <relative-path-to-package>) containing openpackage.yml with a valid version, e.g.
name: "example-package"
version: 0.1.1
description: Example
license: MIT

Works (local scope)

Run from a normal project/workspace:
opkg install <local-path-to-package> --platforms opencode
Fails (global scope)

Run with global install:

opkg install <local-path-to-package> --global --platforms opencode

Expected

opkg should install from a local path source in global scope the same way it does in local scope (no registry/version requirement beyond what’s in openpackage.yml).

Actual

Install fails during the pipeline load phase:
❌ [ERROR] Pipeline failed for :
{
"name": "Error",
"message": "Failed to load package: SourceLoadError: Version is required for registry sources",
"stack": "Error: Failed to load package: SourceLoadError: Version is required for registry sources
at loadPackagePhase (.../dist/core/install/unified/phases/load-package.js:88:15)
at async runUnifiedInstallPipeline (.../dist/core/install/unified/pipeline.js:32:9)
at async installCommand (.../dist/commands/install.js:725:12)
..."
}
Failed to load package: SourceLoadError: Version is required for registry sources

Environment

  • OS: Linux/Debian 13
  • opkg: 0.8.0
  • Node: 25.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions