elevenlabs / elevenlabs-js

The official JavaScript (Node) library for ElevenLabs Text to Speech.
https://elevenlabs.io
MIT License
60 stars 7 forks source link

Something is broken in v `0.1.6` #12

Closed BolajiAyodeji closed 3 months ago

BolajiAyodeji commented 3 months ago

There's an error in the latest version 0.1.6 @dsinghvi. When I try to fetch voices with await elevenlabs.voices.getAll(), I get the error:

ElevenLabsError: fetchFn is not a function
    at Voices.eval (webpack-internal:///(action-browser)/./node_modules/elevenlabs/api/resources/voices/client/Client.js:104:27)
    at Generator.next (<anonymous>)
    at fulfilled (webpack-internal:///(action-browser)/./node_modules/elevenlabs/api/resources/voices/client/Client.js:31:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
ElevenLabsError: fetchFn is not a function
    at Voices.eval (webpack-internal:///(action-browser)/./node_modules/elevenlabs/api/resources/voices/client/Client.js:104:27)
    at Generator.next (<anonymous>)
    at fulfilled (webpack-internal:///(action-browser)/./node_modules/elevenlabs/api/resources/voices/client/Client.js:31:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

I've reverted to 0.1.5, and it works fine. I just thought you should know. Thank you.

dsinghvi commented 3 months ago

@BolajiAyodeji it looks like you are running in the browser, is that correct?

BolajiAyodeji commented 3 months ago

@BolajiAyodeji it looks like you are running in the browser, is that correct?

Yes, it's a Nextjs application. There's a utility function that fetches the voices and is called in the UI.

dsinghvi commented 3 months ago

@BolajiAyodeji this is now fixed in 0.2.0