Dependency issue with urfave/cli.v1 #245

Closed
opened 2026-01-19 18:29:34 +00:00 by michael · 3 comments
Owner

Originally created by @tbi88 on GitHub.

I have got the following error while building the docker image.

go: gopkg.in/urfave/cli.v1@v1.21.0: go.mod has non-....v1 module path "github.com/urfave/cli" at revision v1.21.0
go get: error loading module requirements
ERROR: Service 'transfer.sh' failed to build: The command '/bin/sh -c go get -u ./... && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags -a -tags netgo -ldflags '-w -extldflags "-static"' -o /go/bin/transfersh github.com/dutchcoders/transfer.sh' returned a non-zero code: 1

I solved it by adding the following line at the end of the "go.mod" file.

replace gopkg.in/urfave/cli.v1 => github.com/urfave/cli v1.21.0

Originally created by @tbi88 on GitHub. I have got the following error while building the docker image. ``` go: gopkg.in/urfave/cli.v1@v1.21.0: go.mod has non-....v1 module path "github.com/urfave/cli" at revision v1.21.0 go get: error loading module requirements ERROR: Service 'transfer.sh' failed to build: The command '/bin/sh -c go get -u ./... && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags -a -tags netgo -ldflags '-w -extldflags "-static"' -o /go/bin/transfersh github.com/dutchcoders/transfer.sh' returned a non-zero code: 1 ``` I solved it by adding the following line at the end of the "go.mod" file. `replace gopkg.in/urfave/cli.v1 => github.com/urfave/cli v1.21.0`
Author
Owner

@paolafrancesca commented on GitHub:

I switched to use directly github.com/urfave/cli instead of the forked github.com/minio/cli and it's solved

@paolafrancesca commented on GitHub: I switched to use directly `github.com/urfave/cli` instead of the forked `github.com/minio/cli` and it's solved
Author
Owner

@paolafrancesca commented on GitHub:

@tbi88 I already opened a ticket on go repo that seems related to the same type of error: https://github.com/golang/go/issues/33154

I experienced that error only on tip, but now I can reproduce yours on go 1.12.7-9 at least.
it seems that some package we use was updated to add gopkg.in/urfave/cli.v1 as dependency: the last build from master was tree year ago and was green (https://travis-ci.org/dutchcoders/transfer.sh/builds/573064818)

do you mind opening a ticket on go? otherwise I will do

@paolafrancesca commented on GitHub: @tbi88 I already opened a ticket on go repo that seems related to the same type of error: https://github.com/golang/go/issues/33154 I experienced that error only on tip, but now I can reproduce yours on go 1.12.7-9 at least. it seems that some package we use was updated to add `gopkg.in/urfave/cli.v1` as dependency: the last build from master was tree year ago and was green (https://travis-ci.org/dutchcoders/transfer.sh/builds/573064818) do you mind opening a ticket on go? otherwise I will do
Author
Owner

@tbi88 commented on GitHub:

Hi

I would prefer if you could do it. I am pretty new with go yet...

cheers

@tbi88 commented on GitHub: Hi I would prefer if you could do it. I am pretty new with go yet... cheers
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#245