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

Go get error recently Oct 2019 #1385

Closed
botemple opened this issue Oct 26, 2019 · 9 comments
Closed

Go get error recently Oct 2019 #1385

botemple opened this issue Oct 26, 2019 · 9 comments

Comments

@botemple
Copy link

  • 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

@kataras
Copy link
Owner

kataras commented Oct 26, 2019

Install with: go get -u github.com/kataras/iris/v12@v12.0.1 - read more at installation section

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

@xbsura
Copy link

xbsura commented Oct 28, 2019

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

@kataras
Copy link
Owner

kataras commented Oct 28, 2019

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

@ALTELMA
Copy link

ALTELMA commented Nov 2, 2019

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

@kataras
Copy link
Owner

kataras commented Nov 20, 2019

@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.

@cfanboy
Copy link

cfanboy commented Nov 22, 2019

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)

@kataras
Copy link
Owner

kataras commented Nov 25, 2019

@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.

@kataras kataras closed this as completed Dec 13, 2019
@lichangW
Copy link

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)

@nomulex
Copy link

nomulex commented Aug 2, 2020

I get error package github.com/kataras/iris/v12@v12.1.8: invalid github.com/ import path "github.com/kataras/iris/v12@v12.1.8"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants