I'm using TypeScript with the Mux library for video handling in my application. As per the documentation, I'm attempting to initialize a Mux object with the required token ID and token secret obtained from environment variables.
However, TypeScript is throwing an error indicating that I'm providing too many arguments to the Mux constructor. The error message I'm receiving is
Expected 0-1 arguments, but got 2.
const {Video} = new Mux(
process.env.MUX_TOKEN_ID!,
process.env.MUX_TOKEN_SECRET!,
)
Any assistance or insights would be greatly appreciated. Thank you!
I reviewed the documentation to check if there are any changes to the constructor but it's still not working
You pass an object to Mux with your configuration, it only takes 1 argument, as the error says.
https://www.npmjs.com/package/@mux/mux-node