-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go.mod not found #39
Comments
I'm still having this issue, when using this in a local repostory, I'm not sure if this scenario is supported: Example: git clone git@github.com:banzaicloud/bank-vaults.git
cd bank-vaults
xgo --targets=darwin/arm64 ./cmd/bank-vaults Output: DBG: config: &{Repository:./cmd/bank-vaults Package: Prefix: Remote: Branch: Dependencies: Arguments: Targets:[darwin/arm64]}
DBG: flags: &{Verbose:false Steps:false Race:false Tags: LdFlags: Mode:default}
INFO: go.mod not found. Skipping go modules
INFO: Cross compiling github.com/banzaicloud/bank-vaults/cmd/bank-vaults package...
INFO: Docker run --rm -v /Users/bonifaido/Code/src/github.com/banzaicloud/bank-vaults:/build -v /var/folders/3q/l731kzc93bd307ftq5b4d18c0000gp/T/xgo-cache:/deps-cache:ro -e REPO_REMOTE= -e REPO_BRANCH= -e PACK= -e DEPS= -e ARGS= -e OUT= -e FLAG_V=false -e FLAG_X=false -e FLAG_RACE=false -e FLAG_TAGS= -e FLAG_LDFLAGS= -e FLAG_BUILDMODE=default -e TARGETS=darwin/arm64 -v /Users/bonifaido/Code/src:/ext-go/1/src:ro -e EXT_GOPATH=/ext-go/1 ghcr.io/crazy-max/xgo:latest github.com/banzaicloud/bank-vaults/cmd/bank-vaults
Building locally github.com/banzaicloud/bank-vaults/cmd/bank-vaults...
Compiling for darwin-10.12/arm64...
go: go.mod file not found in current directory or any parent directory; see 'go help modules' |
@bonifaido is it because you are providing |
There is a CLI built from this directory (it has a main() method) and I would like to build that, the root ( |
I see. but xgo expects a |
This worked in |
I see. in that case, I would defer this to the @crazy-max for this. I have not looked into the differences between these 2 repos. :) |
@bonifaido using |
Hello I am running into this weird issue where it says go.mod not found, even though there's a go.mod in that folder
I am using
xgo -go 1.16 --targets="darwin/*,windows/*,linux/*" -out "rosetta-cli-0.7.0" .
Just to add more clarity, It does work when I do
xgo -go 1.16 --targets="darwin/*,windows/*,linux/*" -out "rosetta-cli-0.7.0" github.com/coinbase/rosetta-cli
but it doesn't work when I do that in current directoryInterestingly I was not getting this when I was using https://github.com/karalabe/xgo
The text was updated successfully, but these errors were encountered: