-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReferenceError: Blob is not defined #258
Comments
I believe Blob came at a later version? |
https://nodejs.org/docs/latest-v16.x/api/buffer.html#class-blob I don't see why anyone else still did not encounter this issue with nodejs. I will switch to direct ws connection |
Thanks. Off the top of my head, I cannot remember the difference between Blob on 16 Vs 18, but you are not the first person to raise it. Regardless, the package is pinned at Node 18 because of it |
I'm using node 18
…On Sun, 24 Mar 2024, 23:04 Luke Oliff, ***@***.***> wrote:
Thanks. Off the top of my head, I cannot remember the difference between
Blob on 16 Vs 18, but you are not the first person to raise it.
Regardless, the package is pinned at Node 18 because of it
—
Reply to this email directly, view it on GitHub
<#258 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMCQVTVYQS3TWYQZ65CZGCLYZ5EVNAVCNFSM6AAAAABFFXOS6GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWHE2TSOBSHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
What is the current behavior?
When doing
LiveClient.send
I get this stack trace:(node:2656) UnhandledPromiseRejectionWarning: ReferenceError: Blob is not defined
at LiveClient.send (/voicemail/node_modules/@deepgram/sdk/dist/main/packages/LiveClient.js:81:38)
at WebSocket. (file:///voicemail/server.js:87:30)
at WebSocket.emit (events.js:314:20)
at Receiver.receiverOnMessage (/voicemail/node_modules/ws/lib/websocket.js:1209:20)
at Receiver.emit (events.js:314:20)
at /voicemail/node_modules/ws/lib/receiver.js:608:16
at internal/process/task_queues.js:153:7
at AsyncResource.runInAsyncScope (async_hooks.js:189:9)
at AsyncResource.runMicrotask (internal/process/task_queues.js:150:8)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Other information
My code:
deepgramConnection.send(Buffer.from(msg.media.payload, 'base64'));
Fix
I think just importing Blob should be enough since Node.js 16
The text was updated successfully, but these errors were encountered: