Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I load shark in the work Thread, no matter how I rebuild, the following error occurs repeatedly. #1523

Closed
tangboCHN opened this issue Dec 24, 2018 · 1 comment
Labels

Comments

@tangboCHN
Copy link

tangboCHN commented Dec 24, 2018

Error: Module did not self-register.
at Object.Module._extensions..node (internal/modules/cjs/loader.js:731:18)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
at Module.require (internal/modules/cjs/loader.js:650:17)
at require (internal/modules/cjs/helpers.js:20:18)

const sharp = require('sharp') // error
const { parentPort ,threadId, workerData} = require('worker_threads');
.....

node version : 11.5.0

@lovell
Copy link
Owner

lovell commented Dec 26, 2018

Native modules such as sharp do not work with Node's Worker Threads - please see #1297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants