Angular Universal with GRPC

Viewed 220

Im having issues with setting up GRPC inside Angular Universal App.

Basically, it throws an error:

ERROR Error: This environment's XHR implementation cannot support binary transfer.

This error is breaking the application on production (hosting it on ubuntu and nginx), but, in local envioroment it works.

If I switch Angular to not use SSR, then it works fine.

My assumption is that in the Node Express server I need to add support for GRPC, but im not sure how to achieve that.

Did someone had the same problem?

Thanks!

1 Answers

If no grpc library is defined, adding improbable-eng should solve the issue. The mentioned error message occurs when the transport protocol is not NodeHttpTransport.

Related