smnbbrv / ngx-grpc

Angular gRPC framework
MIT License
238 stars 34 forks source link

[Question] GrpcHandler undefined #105

Closed dprogm closed 1 year ago

dprogm commented 1 year ago

Hello @smnbbrv

this is just a question and possibly not an issue of the lib. I am currently facing the issue that GrpcHandler instance that should be injected into the generated ServiceClient is always undefined:

main.js?v=81968533:17647 ERROR TypeError: Cannot read properties of undefined (reading 'handle')
    at Object.greet (main.js?v=81968533:62933:29)
    at HelloWorldClient2.greet (main.js?v=81968533:62954:22)
    at AppComponent.greet (main.js?v=81968533:62980:38)
    at AppComponent_Template_button_click_1_listener (main.js?v=81968533:62995:18)
    at executeListenerWithErrorHandling (main.js?v=81968533:12276:12)
    at wrapListenerIn_markDirtyAndPreventDefault (main.js?v=81968533:12291:18)
    at HTMLButtonElement.<anonymous> (main.js?v=81968533:54709:34)
    at k.invokeTask (zone.js:409:31)
    at main.js?v=81968533:19950:53
    at AsyncStackTaggingZoneSpec.onInvokeTask (main.js?v=81968533:19950:34)

Would be glad for any hint 😇

dprogm commented 1 year ago

Turned out I was using two different compilers in my build which lead to not properly compiling angular decorator syntax. -> Closed