baudehlo / node-fs-ext

Extras missing from node's fs module
MIT License
101 stars 45 forks source link

This seems to break for worker threads #98

Open d3lm opened 4 years ago

d3lm commented 4 years ago

I am running into an issue where loading fs-ext in a worker thread gives me Error: Module did not self-register as well as

Emitted 'error' event on Worker instance at:
    at Worker.[kOnErrorMessage] (internal/worker.js:232:10)
    at Worker.[kOnMessage] (internal/worker.js:242:37)
    at MessagePort.<anonymous> (internal/worker.js:163:57)
    at MessagePort.emit (events.js:315:20)
    at MessagePort.onmessage (internal/worker/io.js:78:8)
    at MessagePort.exports.emitMessage (internal/per_context/messageport.js:11:10)

Is it true that this package is not compatible with worker threads? If yes, how can this be fixed?

WillAvudim commented 11 months ago

Ran into exactly the same issue: Works fine from the primary thread but crashes with "Error: Module did not self-register" in the worker thread. Node v20.9.0, everything is latest. I even force-reset the NPM cache to pull all the latest.