nest-cloud / nestcloud-grpc-example

How to use nestcloud/grpc for loadbalance rpc call.
10 stars 0 forks source link

Demo not working #10

Closed koolamusic closed 1 year ago

koolamusic commented 4 years ago

I get this error when testing out this demo, I think it might be an issue with nestcloud-grpc

Nest] 24268   - 10/26/2020, 10:18:40 AM   [ExceptionsHandler] Cannot read property 'id' of null +3493ms
TypeError: Cannot read property 'id' of null
    at GrpcClient.getProxyService (/home/koolamusic/git/nestcloud-grpc-example/node_modules/@nestcloud/grpc/grpc-client.js:34:35)
    at Object.grpcService.<computed> [as list] (/home/koolamusic/git/nestcloud-grpc-example/node_modules/@nestcloud/grpc/grpc-client.js:20:46)
    at HeroController.<anonymous> (/home/koolamusic/git/nestcloud-grpc-example/client/hero.controller.ts:32:45)
    at Generator.next (<anonymous>)
    at /home/koolamusic/git/nestcloud-grpc-example/client/hero.controller.ts:19:71
    at new Promise (<anonymous>)
    at __awaiter (/home/koolamusic/git/nestcloud-grpc-example/client/hero.controller.ts:15:12)
    at HeroController.list (/home/koolamusic/git/nestcloud-grpc-example/client/hero.controller.ts:35:16)
    at /home/koolamusic/git/nestcloud-grpc-example/node_modules/@nestjs/core/router/router-execution-context.js:38:29
    at InterceptorsConsumer.intercept (/home/koolamusic/git/nestcloud-grpc-example/node_modules/@nestjs/core/interceptors/interceptors-consumer.j
s:11:20)
cemeheeb commented 3 years ago

Nestcloud looks like awesome project, but poor docs and version hall in packages make me crazy.

xhsui commented 3 years ago

const node = this.lb.choose(this.options.service); node value is null, how to fix it?