Skip to content

Commit bee1ab4

Browse files
committed
cmd/present better error message
Provide a better suggestion for how to fix the error when static files cannot be loaded due to installing and running in module aware mode. See: golang/go#43459
1 parent 13cf844 commit bee1ab4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cmd/present/main.go

+9
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,15 @@ static content by looking for a %q package
137137
in your Go workspaces (GOPATH).
138138
139139
You may use the -base flag to specify an alternate location.
140+
141+
If you installed this binary in module-aware mode (which is default for
142+
go versions 1.16 and above) then you may see the following error:
143+
144+
Couldn't find gopresent files: no required module provides package golang.org/x/tools/cmd/present
145+
146+
If so, you may need to specify the module path with the -base flag.
147+
148+
e.g. -base ~/go/pkg/mod/golang.org/x/[email protected]/cmd/present
140149
`
141150

142151
const localhostWarning = `

0 commit comments

Comments
 (0)