运行报错
来源:3-6 go-micro开发流程梳理

无解的游戏
2021-12-29
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/config/encoder/toml/toml.go:6:2: github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f: missing go.sum entry; to add it:
go mod download github.com/desertbit/timer
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/registry/etcd/etcd.go:16:2: github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f: missing go.sum entry; to add it:
go mod download github.com/desertbit/timer
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/registry/etcd/etcd.go:17:2: github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f: missing go.sum entry; to add it:
go mod download github.com/desertbit/timer
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/auth/token/jwt/jwt.go:7:2: github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f: missing go.sum entry; to add it:
go mod download github.com/desertbit/timer
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/config/source/file/watcher.go:8:2: github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f: missing go.sum entry; to add it:
go mod download github.com/desertbit/timer
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/config/encoder/yaml/yaml.go:4:2: github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f: missing go.sum entry; to add it:
go mod download github.com/desertbit/timer
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/runtime/local/git/git.go:12:2: github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f: missing go.sum entry; to add it:
go mod download github.com/desertbit/timer
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/runtime/local/git/git.go:13:2: github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f: missing go.sum entry; to add it:
go mod download github.com/desertbit/timer
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/runtime/local/git/git.go:14:2: github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f: missing go.sum entry; to add it:
go mod download github.com/desertbit/timer
../../pkg/mod/github.com/jinzhu/gorm@v1.9.16/dialects/mysql/mysql.go:3:8: github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f: missing go.sum entry; to add it:
go mod download github.com/desertbit/timer
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/auth/default.go:4:2: missing go.sum entry for module providing package github.com/google/uuid (imported by github.com/micro/go-micro/v2/auth); to add:
go get github.com/micro/go-micro/v2/auth@v2.9.1
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/config/encoder/hcl/hcl.go:6:2: github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f: missing go.sum entry; to add it:
go mod download github.com/desertbit/timer
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/config/reader/json/json.go:7:2: github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f: missing go.sum entry; to add it:
go mod download github.com/desertbit/timer
../../pkg/mod/github.com/jinzhu/gorm@v1.9.16/model_struct.go:12:2: github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f: missing go.sum entry; to add it:
go mod download github.com/desertbit/timer
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/options.go:7:2: github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f: missing go.sum entry; to add it:
go mod download github.com/desertbit/timer
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/registry/etcd/etcd.go:20:2: github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f: missing go.sum entry; to add it:
go mod download github.com/desertbit/timer
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/broker/nats/nats.go:14:2: github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f: missing go.sum entry; to add it:
go mod download github.com/desertbit/timer
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/registry/etcd/etcd.go:21:2: github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f: missing go.sum entry; to add it:
go mod download github.com/desertbit/timer
domain/service/user_data_service.go:9:2: missing go.sum entry for module providing package golang.org/x/crypto/bcrypt (imported by github.com/sword-demon/user/domain/service); to add:
go get github.com/sword-demon/user/domain/service
../../pkg/mod/github.com/miekg/dns@v1.1.27/dnssec.go:23:2: missing go.sum entry for module providing package golang.org/x/crypto/ed25519 (imported by github.com/miekg/dns); to add:
go get github.com/miekg/dns@v1.1.27
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/broker/http.go:28:2: missing go.sum entry for module providing package golang.org/x/net/http2 (imported by github.com/micro/go-micro/v2/broker); to add:
go get github.com/micro/go-micro/v2/broker@v2.9.1
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/transport/http_transport.go:21:2: missing go.sum entry for module providing package golang.org/x/net/http2/h2c (imported by github.com/micro/go-micro/v2/transport); to add:
go get github.com/micro/go-micro/v2/transport@v2.9.1
../../pkg/mod/github.com/miekg/dns@v1.1.27/udp.go:8:2: missing go.sum entry for module providing package golang.org/x/net/ipv4 (imported by github.com/micro/go-micro/v2/util/mdns); to add:
go get github.com/micro/go-micro/v2/util/mdns@v2.9.1
../../pkg/mod/github.com/miekg/dns@v1.1.27/udp.go:9:2: missing go.sum entry for module providing package golang.org/x/net/ipv6 (imported by github.com/micro/go-micro/v2/util/mdns); to add:
go get github.com/micro/go-micro/v2/util/mdns@v2.9.1
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/server/grpc/grpc.go:28:2: missing go.sum entry for module providing package golang.org/x/net/netutil (imported by github.com/micro/go-micro/v2/server/grpc); to add:
go get github.com/micro/go-micro/v2/server/grpc@v2.9.1
../../pkg/mod/github.com/miekg/dns@v1.1.27/listen_go111.go:11:2: missing go.sum entry for module providing package golang.org/x/sys/unix (imported by github.com/miekg/dns); to add:
go get github.com/miekg/dns@v1.1.27
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/client/grpc/codec.go:15:2: missing go.sum entry for module providing package google.golang.org/grpc (imported by github.com/micro/go-micro/v2/client/grpc); to add:
go get github.com/micro/go-micro/v2/client/grpc@v2.9.1
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/auth/service/proto/auth.pb.go:11:2: missing go.sum entry for module providing package google.golang.org/grpc/codes (imported by github.com/micro/go-micro/v2/server/grpc); to add:
go get github.com/micro/go-micro/v2/server/grpc@v2.9.1
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/client/grpc/grpc_pool.go:8:2: missing go.sum entry for module providing package google.golang.org/grpc/connectivity (imported by github.com/micro/go-micro/v2/client/grpc); to add:
go get github.com/micro/go-micro/v2/client/grpc@v2.9.1
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/client/grpc/grpc.go:24:2: missing go.sum entry for module providing package google.golang.org/grpc/credentials (imported by github.com/micro/go-micro/v2/client/grpc); to add:
go get github.com/micro/go-micro/v2/client/grpc@v2.9.1
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/client/grpc/codec.go:16:2: missing go.sum entry for module providing package google.golang.org/grpc/encoding (imported by github.com/micro/go-micro/v2/client/grpc); to add:
go get github.com/micro/go-micro/v2/client/grpc@v2.9.1
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/client/grpc/grpc.go:26:2: missing go.sum entry for module providing package google.golang.org/grpc/metadata (imported by github.com/micro/go-micro/v2/client/grpc); to add:
go get github.com/micro/go-micro/v2/client/grpc@v2.9.1
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/server/grpc/grpc.go:35:2: missing go.sum entry for module providing package google.golang.org/grpc/peer (imported by github.com/micro/go-micro/v2/server/grpc); to add:
go get github.com/micro/go-micro/v2/server/grpc@v2.9.1
../../pkg/mod/github.com/micro/go-micro/v2@v2.9.1/client/grpc/error.go:5:2: missing go.sum entry for module providing package google.golang.org/grpc/status (imported by github.com/micro/go-micro/v2/client/grpc); to add:
go get github.com/micro/go-micro/v2/client/grpc@v2.9.1
../../pkg/mod/github.com/golang/protobuf@v1.4.3/jsonpb/decode.go:19:2: missing go.sum entry for module providing package google.golang.org/protobuf/encoding/protojson (imported by github.com/golang/protobuf/jsonpb); to add:
go get github.com/golang/protobuf/jsonpb@v1.4.3
../../pkg/mod/github.com/golang/protobuf@v1.4.3/proto/buffer.go:11:2: missing go.sum entry for module providing package google.golang.org/protobuf/encoding/prototext (imported by github.com/golang/protobuf/proto); to add:
go get github.com/golang/protobuf/proto@v1.4.3
../../pkg/mod/github.com/golang/protobuf@v1.4.3/proto/buffer.go:12:2: missing go.sum entry for module providing package google.golang.org/protobuf/encoding/protowire (imported by github.com/golang/protobuf/proto); to add:
go get github.com/golang/protobuf/proto@v1.4.3
../../pkg/mod/github.com/golang/protobuf@v1.4.3/proto/deprecated.go:13:2: missing go.sum entry for module providing package google.golang.org/protobuf/proto (imported by github.com/golang/protobuf/proto); to add:
go get github.com/golang/protobuf/proto@v1.4.3
../../pkg/mod/github.com/golang/protobuf@v1.4.3/proto/defaults.go:8:2: missing go.sum entry for module providing package google.golang.org/protobuf/reflect/protoreflect (imported by github.com/golang/protobuf/proto); to add:
go get github.com/golang/protobuf/proto@v1.4.3
../../pkg/mod/github.com/golang/protobuf@v1.4.3/proto/extensions.go:15:2: missing go.sum entry for module providing package google.golang.org/protobuf/reflect/protoregistry (imported by github.com/golang/protobuf/proto); to add:
go get github.com/golang/protobuf/proto@v1.4.3
../../pkg/mod/github.com/golang/protobuf@v1.4.3/proto/extensions.go:16:2: missing go.sum entry for module providing package google.golang.org/protobuf/runtime/protoiface (imported by github.com/golang/protobuf/proto); to add:
go get github.com/golang/protobuf/proto@v1.4.3
../../pkg/mod/github.com/golang/protobuf@v1.4.3/proto/buffer.go:13:2: missing go.sum entry for module providing package google.golang.org/protobuf/runtime/protoimpl (imported by github.com/golang/protobuf/proto); to add:
go get github.com/golang/protobuf/proto@v1.4.3
Compilation finished with exit code 1
于是我删掉go.mod
的require
的进行
go mod tidy
go: finding module for package google.golang.org/grpc/naming
go: finding module for package google.golang.org/grpc/examples/helloworld/helloworld
go: found google.golang.org/grpc/examples/helloworld/helloworld in google.golang.org/grpc/examples v0.0.0-20211228230712-fbaf7c558210
go: finding module for package google.golang.org/grpc/naming
github.com/sword-demon/user imports
github.com/micro/go-micro/v2 imports
github.com/micro/go-micro/v2/config/cmd imports
github.com/micro/go-micro/v2/registry/etcd imports
github.com/coreos/etcd/clientv3 tested by
github.com/coreos/etcd/clientv3.test imports
github.com/coreos/etcd/integration imports
github.com/coreos/etcd/proxy/grpcproxy imports
google.golang.org/grpc/naming: module google.golang.org/grpc@latest found (v1.43.0), but does not contain package google.golang.org/grpc/naming
老师,这个要咋整
。。。。。。。
妈的,我再试一遍,又好了。
/private/var/folders/57/6cqtkq256b71ctzxg7j8w8940000gn/T/___go_build_github_com_sword_demon_user
2021-12-29 23:34:52 file=v2@v2.9.1/service.go:200 level=info Starting [service] go.micro.service.user
2021-12-29 23:34:52 file=grpc/grpc.go:864 level=info Server [grpc] Listening on [::]:51977
2021-12-29 23:34:52 file=grpc/grpc.go:697 level=info Registry [mdns] Registering node: go.micro.service.user-b755f2ed-dfa5-4fd4-85c5-14b62641b601
无解。
写回答
1回答
-
只是为了好玩
2022-01-18
你这个问题是缺少包依赖,
解决方法是执行 go mod tidy 命令即可。
00
相似问题
运行 micro -v报错
回答 2
运行命令报错.win10 wsl2
回答 1