ElevenLabs SDK Doesn't work due to node:stream
🪲Bug Report
I was trying to deploy elevenLabs SDK with convex, but during deployment I got the following errors
And it seems that elevenLabls uses node:stream and crypto, which I guess convex actions esbuild don't support?
And it seems that elevenLabls uses node:stream and crypto, which I guess convex actions esbuild don't support?
✔ Ran "npm run build" with environment variable "PUBLIC_CONVEX_URL" set
- Deploying to https://xyz-639.convex.cloud...
Temporary directory '/tmp' and project directory '/vercel/path0/convex/_generated' are on different filesystems.
If you're running into errors with other tools watching the project directory, override the temporary directory location with the CONVEX_TMPDIR environment variable.
Be sure to pick a temporary directory that's on the same filesystem as your project.
✘ [ERROR] Could not resolve "node:child_process"
node_modules/@elevenlabs/elevenlabs-js/wrapper/play.js:55:82:
55 │ ...resolve().then(() => __importStar(require("node:child_process")));
╵ ~~~~~~~~~~~~~~~~~~~~
The package "node:child_process" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.✔ Ran "npm run build" with environment variable "PUBLIC_CONVEX_URL" set
- Deploying to https://xyz-639.convex.cloud...
Temporary directory '/tmp' and project directory '/vercel/path0/convex/_generated' are on different filesystems.
If you're running into errors with other tools watching the project directory, override the temporary directory location with the CONVEX_TMPDIR environment variable.
Be sure to pick a temporary directory that's on the same filesystem as your project.
✘ [ERROR] Could not resolve "node:child_process"
node_modules/@elevenlabs/elevenlabs-js/wrapper/play.js:55:82:
55 │ ...resolve().then(() => __importStar(require("node:child_process")));
╵ ~~~~~~~~~~~~~~~~~~~~
The package "node:child_process" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.✘ [ERROR] Could not resolve "node:events"
node_modules/@elevenlabs/elevenlabs-js/wrapper/realtime/connection.js:8:30:
8 │ const node_events_1 = require("node:events");
╵ ~~~~~~~~~~~~~✘ [ERROR] Could not resolve "node:events"
node_modules/@elevenlabs/elevenlabs-js/wrapper/realtime/connection.js:8:30:
8 │ const node_events_1 = require("node:events");
╵ ~~~~~~~~~~~~~✘ [ERROR] Could not resolve "node:stream"
node_modules/@elevenlabs/elevenlabs-js/wrapper/play.js:56:85:
56 │ ...romise.resolve().then(() => __importStar(require("node:stream")));
✘ [ERROR] Could not resolve "crypto"
node_modules/@elevenlabs/elevenlabs-js/wrapper/webhooks.js:14:25:
14 │ const crypto_1 = require("crypto");
╵ ~~~~~~~~
The package "crypto" wasn't found on the file system...✘ [ERROR] Could not resolve "node:stream"
node_modules/@elevenlabs/elevenlabs-js/wrapper/play.js:56:85:
56 │ ...romise.resolve().then(() => __importStar(require("node:stream")));
✘ [ERROR] Could not resolve "crypto"
node_modules/@elevenlabs/elevenlabs-js/wrapper/webhooks.js:14:25:
14 │ const crypto_1 = require("crypto");
╵ ~~~~~~~~
The package "crypto" wasn't found on the file system...