graphile / worker

High performance Node.js/PostgreSQL job queue (also suitable for getting jobs generated by PostgreSQL triggers/functions out into a different work queue)
http://worker.graphile.org/
MIT License
1.83k stars 103 forks source link

Enable development under Windows #324

Open benjie opened 1 year ago

benjie commented 1 year ago

See https://github.com/graphile/worker/pull/316#issuecomment-1427173046

(To be clear: Graphile Worker works fine under Windows, it's cloning the repository and then contributing to it that doesn't work so well.)

hiepxanh commented 10 months ago
core] WARNING: Executable file detection not yet supported on 'win32'.

Error: Error processing 'C:\Users\hiepx\small-cosmos\losa\tmp\apps\backend\worker\libs\backend\worker-task\src\tasks\demo.js': Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'

https://github.com/graphile/worker/blob/8f503c25c7a96526a9295579dfe7133ea55f208c/src/plugins/LoadTaskFromExecutableFilePlugin.ts#L25

I think it not work well on windows, I try to load file direct using task folder from typescript project on windows and stuck with this error. Should I create new issue?

since I'm developing on Windows, I cannot get realtime update file if I cannot run this code. It's used to work on 0.14 version. I'm running library version instead of CLI, maybe this is the issue?

benjie commented 10 months ago

Please file a separate issue, this issue is unrelated to that problem. Sounds like we just need to add file:// to the beginning of our import() calls. If you also want to raise a fix that would be welcome, as I don't have a Windows development machine so I'd only be guessing.