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 import zap via go dep (https://golang.github.io/dep) #552

Closed
nayakravi opened this issue Jan 25, 2018 · 3 comments
Closed

cannot import zap via go dep (https://golang.github.io/dep) #552

nayakravi opened this issue Jan 25, 2018 · 3 comments

Comments

@nayakravi
Copy link

The error message is:
"ensure Solve(): No versions of github.com/uber-go/zap met constraints:
v1.7.1: Could not introduce github.com/uber-go/[email protected], as its subpackage github.com/uber-go/zap does not contain usable Go code (*pkgtree.NonCanonicalImportRoot).. (Package is required by (root).)"

The possible cause is logged here: golang/dep#899
There may be relative paths in your import statements. Any chance you can make zap go dep compliant?

@dstrop
Copy link

dstrop commented Jan 27, 2018

try dep ensure -add go.uber.org/zap

@Tri125
Copy link

Tri125 commented Jan 29, 2018

I've had the same issue and I can confirm that setting the constraint name to go.uber.org/zap solved it.

@nayakravi
Copy link
Author

Thank you @dstrop - that worked! I'm closing this issue.

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

No branches or pull requests

3 participants