mattermost-plugin-starter-template
mattermost-plugin-starter-template copied to clipboard
Error after running `make`
Running make produces this error.
- Commenting out line 70 in the Makefile fixes the issue
# $(GO) vet -vettool=$(GOPATH)/bin/shadow ./...
Usage: shadow [-flag] [package]
This analyzer check for shadowed variables.
A shadowed variable is a variable declared in an inner scope
with the same name and type as a variable in an outer scope,
and where the outer variable is mentioned after the inner one
is declared.
(This definition can be refined; the module generates too many
false positives and is not yet enabled by default.)
For example:
func BadRead(f *os.File, buf []byte) error {
var err error
for {
n, err := f.Read(buf) // shadows the function variable 'err'
if err != nil {
break // causes return of wrong value
}
foo(buf)
}
return err
}
Flags: -V print version and exit
-all
no effect (deprecated)
-c int
display offending line with this many lines of context (default -1)
-cpuprofile string
write CPU profile to this file
-debug string
debug flags, any subset of "fpstv"
-fix
apply all suggested fixes
-flags
print analyzer flags in JSON
-json
emit JSON output
-memprofile string
write memory profile to this file
-source
no effect (deprecated)
-strict
whether to be strict about shadowing; can be noisy
-tags string
no effect (deprecated)
-trace string
write trace log to this file
-v no effect (deprecated)
make: *** [govet] Error 2
What go version are you using?
go version go1.13.1 darwin/amd64
Would you please try running go get -u golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
in /tmp
?
Hi, i cannt compile too, on make
i get:
main.go:9:2: cannot find package "github.com/mattermost/mattermost-server/v5/model" in any of:
/usr/lib/go-1.10/src/github.com/mattermost/mattermost-server/v5/model (from $GOROOT)
/home/xxx/go/src/github.com/mattermost/mattermost-server/v5/model (from $GOPATH)
main.go:10:2: cannot find package "github.com/pkg/errors" in any of:
/usr/lib/go-1.10/src/github.com/pkg/errors (from $GOROOT)
/home/xxx/go/src/github.com/pkg/errors (from $GOPATH)
main.go:11:2: cannot find package "github.com/mattermost/mattermost-server/v5/model" in any of:
/usr/lib/go-1.10/src/github.com/mattermost/mattermost-server/v5/model (from $GOROOT)
/home/xxx/go/src/github.com/mattermost/mattermost-server/v5/model (from $GOPATH)
main.go:12:2: cannot find package "github.com/mholt/archiver/v3" in any of:
/usr/lib/go-1.10/src/github.com/mholt/archiver/v3 (from $GOROOT)
/home/xxx/go/src/github.com/mholt/archiver/v3 (from $GOPATH)
main.go:13:2: cannot find package "github.com/pkg/errors" in any of:
/usr/lib/go-1.10/src/github.com/pkg/errors (from $GOROOT)
/home/xxx/go/src/github.com/pkg/errors (from $GOPATH)
make: build/bin/manifest: Command not found
build/setup.mk:16: *** "Cannot parse id from plugin.json". Stop.
Tried running go get ./...
?
I got it to compile/make, the default golang in Ubuntu 18.04 is go1.10, that doesn't work. After upgrade to go1.14 is all ok, it does compile.
sure it is not my business but you should consider to write the requirements for development environment. i am still not able to compile this template, i've installed latest nodejs, npm, golang and now after 2 hours i stick in some eslint error ... that feels more alpha than beta so far.
What error are you getting? If I am to take a wild guess, make sure you also have TypeScript installed, otherwise, please share the error details.