Sending events to EventHub using '@azure/event-hubs' gives error

Discussão em 'Angular' iniciado por wonderful world, Fevereiro 7, 2025.

  1. I'm using Angular 19 and typescript to send an event to the EventHub from the browser. The npm package that I use is @azure/event-hubs. I'm not using server side node.js.

    import {EventHubProducerClient} from '@azure/event-hubs';

    As soon as that application starts, I get the following error:

    browser-external:util:9 Module "util" has been externalized for browser compatibility. Cannot access "util.inherits" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.

    How can I fix this error? Should I be using a different typescript npm package?

    [​IMG]

    Continue reading...

Compartilhe esta Página