Skip to content
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

Cannot run #122

Open
2 tasks done
wiegell opened this issue Feb 5, 2024 · 3 comments
Open
2 tasks done

Cannot run #122

wiegell opened this issue Feb 5, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@wiegell
Copy link

wiegell commented Feb 5, 2024

Bug report

gomod graph '**'
11:44:41 error modinfo Command exited with an error. {"args": ["/Users/bjoern/gocode/bin/go", "go", "list", "-json", "-m", "-mod=mod", "all"], "error": "exit status 1"}
11:44:41 error modinfo Failed to list modules in dependency graph via 'go list'. {"error": "failed to run 'go list -json -m -mod=mod all: exit status 1"}
Error: failed to run 'go list -json -m -mod=mod all: exit status 1

And the direct output of the list:

go list -json -m -mod=mod all
go: -mod may only be set to readonly when in workspace mode, but it is set to "mod"
	Remove the -mod flag to use the default readonly value,
	or set GOWORK=off to disable workspace mode.

Checklist

  • Your description contains all necessary context to understand and reproduce the bug you are reporting.
  • You have filled in the three sections below and deleted their corresponding placeholders texts.

Description

I cannot run the command

Suggested way of addressing this issue

the list command seems to work without the -mod=mod? is it needed?

Additional information

go version go1.20.5 darwin/arm64

@wiegell wiegell added the bug Something isn't working label Feb 5, 2024
@SkybuckFlying
Copy link

Same problem:
K:\Delphi\Blockchains\SkyVite\WorkTrees\GoModAnalysis\version release 2.13.0>gomod analyse
21:39:28 error modinfo Command exited with an error. {"args": ["G:\Tools\Go\bin\go.exe", "go", "mod", "download"], "error": "exit status 1"}
21:39:28 error modinfo Failed to run 'go mod download'. {"error": "failed to run 'go mod download: exit status 1"}
Error: failed to run 'go mod download: exit status 1
Usage:
gomod analyse [flags]

@SkybuckFlying
Copy link

K:\Delphi\Blockchains\SkyVite\WorkTrees\GoModAnalysis\version release 2.13.0>gomod graph
21:40:37 error modinfo Command exited with an error. {"args": ["G:\Tools\Go\bin\go.exe", "go", "mod", "download"], "error": "exit status 1"}
21:40:37 error modinfo Failed to run 'go mod download'. {"error": "failed to run 'go mod download: exit status 1"}
Error: failed to run 'go mod download: exit status 1
Usage:
gomod graph [flags]

@edelmanjm
Copy link

edelmanjm commented Nov 21, 2024

Same here, but I'm able to run go list -json -mod=mod my_package/... just fine in a terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants