BullMQ not working with cloudflare Workers!

const connection = new IORedis(c.env.REDIS_URL);
const sendEmailQ = new Queue('sendEmailQ', { connection });
const connection = new IORedis(c.env.REDIS_URL);
const sendEmailQ = new Queue('sendEmailQ', { connection });
Error
node_modules/bullmq/dist/esm/classes/child.js:2:23:
2import { Worker } from 'worker_threads';
~~~~~~~~~~~~~~~~

The package "worker_threads" 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
node_modules/bullmq/dist/esm/classes/child.js:2:23:
2import { Worker } from 'worker_threads';
~~~~~~~~~~~~~~~~

The package "worker_threads" 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
is there any way or alternative package which i use with cloudflare workers.
1 Reply
James
JamesOP13mo ago
any way to work around with this?
Want results from more Discord servers?
Add your server