Closed DosCervezas closed 1 year ago
Hi @DosCervezas, thanks for bringing this to our attention. We've filed an internal ticket to track this. In the meantime, could you try this workaround?
NPM provides "installation aliasing" such that you can install a package under an alias. The very popular eventemitter3
package (https://www.npmjs.com/package/eventemitter3) should have the same signature as the built-in Node.js event
module. Installing eventemitter3
as an alias for event
could work, and can be done like so
npm i event@npm:eventemitter3
Check the npm
docs to see if it suits your use-case first: https://docs.npmjs.com/cli/v8/commands/npm-install
(Also please in the future have a title for future Issue Requests)
ohh fail sorry mybad, ofc I will title next time, first issue 😉
I already added the twilio.min.js prebuild from your github repository and It works like a charm. If you fixed this bug I will switch back to the npm dependency!
Thanks for your fast reply! 😁
I just added the @twilio/voice-sdk with npm install and if I try to build all my js libraries with esbuild I get the error 'The package "events" wasn't found on the file system but is built into node' package.json:
I could add the platform=node flag to the esbuild to build it successfully but I am running an Ruby on Rails App and therefore are all JS Modules for the frontend itself -> will be shipped to the browser. I am sure this flag is not a good security option. But the example uses this library in the frontend and delivers it.. but to make the example simple just the minified version is used... https://github.com/TwilioDevEd/voice-javascript-sdk-quickstart-ruby But @twilio/voice-sdk recommend using npm.. so i want to use it (its lesser work for myself)
Expected behavior:
I can build with esbuild all my js frontend libraries without some extra twilio workaround stuff
Actual behavior: Log:
TODO
Software versions: