Iris: Go get error recently Oct 2019

Created on 26 Oct 2019  Â·  9Comments  Â·  Source: kataras/iris

  • go get -u github.com/kataras/iris

github.com/kataras/iris/core/errgroup

/go/src/github.com/kataras/iris/core/errgroup/errgroup.go:109:9: undefined: errors.Unwrap

/go/src/github.com/kataras/iris/core/errgroup/errgroup.go:118:8: undefined: errors.Is

/go/src/github.com/kataras/iris/core/errgroup/errgroup.go:125:10: undefined: errors.Is

/go/src/github.com/kataras/iris/core/errgroup/errgroup.go:137:8: undefined: errors.As

/go/src/github.com/kataras/iris/core/errgroup/errgroup.go:150:10: undefined: errors.As

github.com/kataras/iris/context

/go/src/github.com/kataras/iris/context/context.go:2859:6: undefined: errors.Is

script returned exit code 2

question

Most helpful comment

package github.com/kataras/iris/v12/cache: cannot find package "github.com/kataras/iris/v12/cache" in any of:
/usr/local/go/src/github.com/kataras/iris/v12/cache (from $GOROOT)
/Users/clausewang/Tencent/zhuji/src/github.com/kataras/iris/v12/cache (from $GOPATH)
package github.com/kataras/iris/v12/context: cannot find package "github.com/kataras/iris/v12/context" in any of:
/usr/local/go/src/github.com/kataras/iris/v12/context (from $GOROOT)

All 9 comments

Install with: go get -u github.com/kataras/iris/[email protected] - read more at installation section

And install the latest go(go1.13.3) from https://golang.org/dl

same error:
cannot use crs (type "github.com/kataras/iris/v12/context".Handler) as type "github.com/kataras/iris/context".Handler in argument to app.APIBuilder.Party

Hello @xbsura and @botemple and everyone else reading this comment,

First of all, I know that some of you may have issues because of this change and I am really sorry about that. It's a breaking change one as explained at POLL but the community have voted and I think they've made the best decision. We are here to help you, if you have any issues with this change we can provide you real-time assistance at https://chat.iris-go.com.

Now, let's check the issue of yours @xbsura and probably the 99% of the cases, you will have this error if you just updated a part of your application. If your application uses iris-contrib/middleware then you shall update those too,
e.g. $ go get -u github.com/iris-contrib/middleware/cors on your project's system path and use go modules (go mod init), if you don't yet.

Thanks,
Gerasimos Maropoulos

Do you have any option for Glide? I cannot update vendor, because it can't find v12.

Error scanning github.com/kataras/iris/12: cannot find package "." in:
    /root/.glide/cache/src/https-github.com-kataras-iris/12
[ERROR] Error scanning github.com/kataras/iris/v12/mvc: cannot find package "." in:
    /root/.glide/cache/src/https-github.com-kataras-iris/v12/mvc
[ERROR] Failed to retrieve a list of dependencies: Error resolving imports

@ALTELMA with Go modules both dep and glide will be achieved in the end. Read the following links:

Please use Go modules and remove dep(gopkg files) and glide files - the sooner the better for you and your projects.

My project did not use go module feature.
When I updated via 'go get -u github.com/kataras/iris', then run main.go, it throws errors:

../github.com/kataras/iris/core/host/supervisor.go:312:3: unknown field 'ForceRSA' in struct literal of type autocert.Manager
../github.com/kataras/iris/core/host/supervisor.go:319:31: autoTLSManager.HTTPHandler undefined (type *autocert.Manager has no field or method HTTPHandler)

@cfanboy These errors are different and has nothing to do with go 1.13. These errors are coming because you have an older version of "golang.org/x/crypto/acme/autocert" package, maybe your dep tool does not download the latest one?

If you do just go get -u github.com/kataras/iris then it will not download the v12.1.0 it will download the v11.1.1+incomplete patch. Please use go modules, it's not hard. And if you don't use go modules, then target your dep/glid to github.com/kataras/iris/v12 v12.1.0 version.

package github.com/kataras/iris/v12/cache: cannot find package "github.com/kataras/iris/v12/cache" in any of:
/usr/local/go/src/github.com/kataras/iris/v12/cache (from $GOROOT)
/Users/clausewang/Tencent/zhuji/src/github.com/kataras/iris/v12/cache (from $GOPATH)
package github.com/kataras/iris/v12/context: cannot find package "github.com/kataras/iris/v12/context" in any of:
/usr/local/go/src/github.com/kataras/iris/v12/context (from $GOROOT)

I get error package github.com/kataras/iris/[email protected]: invalid github.com/ import path "github.com/kataras/iris/[email protected]"

Was this page helpful?
0 / 5 - 0 ratings