Skip to content

go mod tidy Fails Due to Module Path Mismatch: github.com/docker/docker/api vs github.com/moby/moby/api #963

@ShigrafS

Description

@ShigrafS

Current Behavior

When running go mod tidy in MeshKit, several tests fail with errors like:

github.com/docker/docker/api@v1.54.0: parsing go.mod:
module declares its path as: github.com/moby/moby/api
                but was required as: github.com/docker/docker/api

These errors occur in dependencies such as github.com/kubernetes/kompose and github.com/fsouza/go-dockerclient.

Expected Behavior

All tests should run successfully with go test ./... without any module path mismatches, even when the code itself hasn’t changed.

Screenshots/Logs

# github.com/meshery/meshkit/utils/kubernetes/kompose imports
github.com/kubernetes/kompose/client imports
github.com/kubernetes/kompose/pkg/app imports
github.com/kubernetes/kompose/pkg/transformer imports
github.com/fsouza/go-dockerclient imports
github.com/docker/docker/api/types/registry: github.com/docker/docker/api@v1.54.0: parsing go.mod:
module declares its path as: github.com/moby/moby/api
                but was required as: github.com/docker/docker/api

Environment

  • Host OS: Windows 11
  • Platform: (tested locally)
  • Meshery Server Version: N/A (MeshKit library)
  • Meshery Client Version: N/A (MeshKit library)

Suggested Fix / Notes

Adding a replace directive in go.mod appears to resolve this:

replace github.com/docker/docker/api => github.com/moby/moby/api v20.10.24+incompatible

This allows Go to reconcile the module path mismatch without changing MeshKit source code.


Contributor [Guides](https://docs.meshery.io/project/contributing) and [Handbook](https://meshery.io/community#handbook)

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions