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

[WASM] Cannot find module 'worker_threads' #3852

Closed
akineeic opened this issue Aug 25, 2020 · 3 comments
Closed

[WASM] Cannot find module 'worker_threads' #3852

akineeic opened this issue Aug 25, 2020 · 3 comments

Comments

@akineeic
Copy link

TensorFlow.js version

"tfjs-core": "2.3.0"
"tfjs-backend-wasm": "2.3.0",

Browser version

84.0.4147.105 (Official Build) (64-bit)

Describe the problem or feature request

I want to try the newest version of tfjs-backend-wasm. But the error as follows occured when import the module. Is this caused by the missing of package or need some configuration to run tfjs-backend-wasm 2.3.0

Uncaught Error: Cannot find module 'worker_threads'

Code to reproduce the bug

Just using the example of webpack in this repo and modify the version of tfjs-backend-wasm to 2.3.0 in package.json

@orporan
Copy link

orporan commented Aug 25, 2020

+1

@annxingyuan
Copy link
Contributor

Hey @akineeic - thank you for reporting this. I believe this should be fixed by: #3829 - this will be available in our next release.

In the meantime, you could modify the package.json of your project: in the browser field, add worker_threads: false and perf_hooks: false

@willmorgan
Copy link

@annxingyuan Thanks for looking at this, do you have an ETA for the next release?

This doesn't seem to work with my fairly standard webpack config:

In the meantime, you could modify the package.json of your project: in the browser field, add worker_threads: false and perf_hooks: false

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

No branches or pull requests

5 participants