/github.com/Azure/go-autorest/autorest/adal/token.go:40:2: cannot find package

Dear all,

i have will develop a script that uses the “github.com/Azure/go-autorest/autorest/azure/auth” library.
after starting the code i get the error

<User>@<host> az_ressourcen_version % go run main.go        
../github.com/Azure/go-autorest/autorest/adal/token.go:40:2: cannot find package "github.com/golang-jwt/jwt/v4" in any of:
        /usr/local/go/src/github.com/golang-jwt/jwt/v4 (from $GOROOT)
        /Users/<User>/go/src/github.com/golang-jwt/jwt/v4 (from $GOPATH)

the jwt is installed but in go.mod i finbd this informations

<User>@<host> jwt % cat go.mod
module github.com/golang-jwt/jwt/v5

go 1.18

require github.com/golang-jwt/jwt/v4 v4.5.0 // indirect

an go mod tiny has not solved my problem.
Have anyone an idea how can i fix it?

Is your GO111MODULE env variable set to “on”? I get the same error when I set it to off. Check with go env

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.