bullmq icon indicating copy to clipboard operation
bullmq copied to clipboard

[Bug]: Error handling child message

Open iamchathu opened this issue 1 year ago • 4 comments

Version

v4.7.3

Platform

NodeJS

What happened?

  • It gives Error handling child message when run the transpilled code. (pnpm build && node dist/index.js)
  • It works with tsx with it's esbuild setup. Check pnpm dev:tsx
  • It fails with @swc-node/register/esm and ts-node also. pnpm dev.

To reproduce https://github.com/iamchathu/bullmq-typescript-express.git

How to reproduce.

https://github.com/iamchathu/bullmq-typescript-express.git

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

iamchathu avatar Aug 20 '23 15:08 iamchathu

Seems there is a module type specifier in Worker API which is not exposed but the bullmq worker

const worker = new Worker(new URL('./worker.js', import.meta.url), {
  type: 'module',
})

Is there any update on this or work arounds for this?

iamchathu avatar Sep 03 '23 10:09 iamchathu

Hey @iamchathu, did you find any solution/workaround for this? It's been pretty hard to debug this so far 😕

xavier-villelegier avatar Jan 04 '24 23:01 xavier-villelegier

With worker threads enabled, the job file path seemed to require a different syntax on Windows (anti-slashes) to avoid this error. The actual message and stack could be logged here. This did not happen on other systems with the same project.

LEI avatar Jan 06 '24 13:01 LEI

@xavier-villelegier I haven't found any fix for this yet :(

iamchathu avatar Jan 07 '24 12:01 iamchathu