meshery / meshery/meshkit

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

Open
#963 3 comments 0 reactions 1 assignee View on GitHub

@shteypandey28-hue is already working on this.

Since Jun 30, 2026.

kind/bug
Dominant language
Go
Stars
223
Forks
225
Avg merge
7d 1h
Merged PRs (30d)
1

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.