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

Cannot install using Go modules #42

Closed
carldunham opened this issue Sep 8, 2019 · 7 comments
Closed

Cannot install using Go modules #42

carldunham opened this issue Sep 8, 2019 · 7 comments

Comments

@carldunham
Copy link

At least with Go 1.13, I am not able to use 4.0.x versions. It's the same problem that chi v4 has, but there are changes in v4 here that I'm relying on. It looks like chi v4 was just an experiment in moduling.

@carldunham
Copy link
Author

And by "relying on", I really mean "too lazy to work around", which I actually already have. Just leaving this here as evidence that more people are migrating to modules (as you apparently have for your own dependency management), and that this might be something to give higher priority to. It does seem like the "modules >= v2" problem has not been addressed well. Hopefully, you can find a clean way to deal with it. Happy to help if I can.

@VojtechVitek
Copy link
Contributor

GO111MODULE=on go get -u github.com/go-chi/[email protected] should work

@carldunham
Copy link
Author

Sadly, that does not:

% GO111MODULE=on go get -u github.com/go-chi/[email protected]
go: finding github.com/go-chi/jwtauth v4.0.2
go: finding github.com/go-chi/jwtauth v4.0.2
go get github.com/go-chi/[email protected]: github.com/go-chi/[email protected]: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v4

@VojtechVitek
Copy link
Contributor

Interesting. I didn't realize I was using v3.2.0+incompatible in my codebase so far.

@VojtechVitek VojtechVitek reopened this Sep 9, 2019
@VojtechVitek
Copy link
Contributor

You're right. This project shouldn't have go.mod file, since it's not released with a proper "/v4" module path.

You'll have to use exact commit SHA when installing this pkg for now..

v4.0.2 has SHA 47840ab, see https://github.com/go-chi/jwtauth/releases

and this works:

GO111MODULE=on go get -u github.com/go-chi/jwtauth@47840abb19b36dcf4d3ab4123b605b28ea511bc8

@pkieltyka
Copy link
Member

hey guys, I've resolved this with jwtauth v4.0.3 -- that is, I've removed the invalid go.mod file.

also see #38 (comment)

@carldunham
Copy link
Author

Hey, thanks for this. Working great now!

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

No branches or pull requests

3 participants