Reputation: 161
I wrote an app and when i add go modules to my project go mod init
and try to start go run app.go
i had an error: build command-line-arguments: cannot load github.com/nicksnyder/go-i18n/i18n: module github.com/nicksnyder/go-i18n@latest (v2.0.2+incompatible) found, but does not contain package github.com/nicksnyder/go-i18n/i18n
. What can i do with this problem?
go.mod:
require (
github.com/BurntSushi/toml v0.3.1
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/dyatlov/go-opengraph v0.0.0-20180429202543-816b6608b3c8 // indirect
github.com/go-ldap/ldap v3.0.3+incompatible // indirect
github.com/gorilla/handlers v1.4.2
github.com/gorilla/mux v1.7.3
github.com/gorilla/websocket v1.4.1 // indirect
github.com/mattermost/mattermost-server v5.11.1+incompatible
github.com/pborman/uuid v1.2.0 // indirect
github.com/syndtr/goleveldb v1.0.0
go.uber.org/zap v1.12.0 // indirect
golang.org/x/crypto v0.0.0-20191029031824-8986dd9e96cf // indirect
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
)
go.sum:
...
github.com/nicksnyder/go-i18n v2.0.2+incompatible
...
Upvotes: 0
Views: 1328
Reputation: 51657
Check if you're importing the correct package. It looks like that package was moved to github.com/nicksnyder/go-i18n/i18n/v2, so import that instead.
Upvotes: 1