ccoreilly / vosk-browser

A speech recognition library running in the browser thanks to a WebAssembly build of Vosk
Apache License 2.0
364 stars 60 forks source link

Module not found: Error: Can't resolve 'worker_threads' in #29

Closed tab-zero closed 2 years ago

tab-zero commented 2 years ago

I used the vosk-browser in one of my webpack projects and it throws these errors. Module not found: Error: Can't resolve 'worker_threads' in ....

Steps I followed:

tab-zero commented 2 years ago

I also required to NodePolyfills plugin for webpack to work. https://github.com/webpack/webpack/pull/8460/commits/a68426e9255edcce7822480b78416837617ab065

TrofinSorin commented 2 years ago

I tried the react example and i get worker_threads error also.

Webpack: 5.60.0 Node: 14.1.0

ccoreilly commented 2 years ago

The latest commit will remove this warning. This library only targets the browser and worker_threads is only necessary in node, so it could be ignored.