react-native-threads icon indicating copy to clipboard operation
react-native-threads copied to clipboard

Error: Unable to resolve module `./worker.thread` from ``:

Open nguyenvanquan7826 opened this issue 3 years ago • 5 comments

I try to create two file worker.thread.js with same content.

  • 1 file same folder with App.js
  • 1 file same folder with process data file (processData.js)

I call: const thread = new Thread('./worker.thread.js'); from processData.js, but it show error Unable to resolve module ./worker.thread.

Please help me.

nguyenvanquan7826 avatar Apr 23 '21 09:04 nguyenvanquan7826

same here

martinop avatar Jun 11 '21 16:06 martinop

in release ipa, u can try this thread js bundle resolver

h2soheili avatar Jun 19 '21 22:06 h2soheili

For anyone else who runs into this, in dev mode bundler only picks up js files in project root. So just do new Thread("../worker.js").

OzymandiasTheGreat avatar Oct 09 '21 18:10 OzymandiasTheGreat

same here

jayce-incognito avatar Jan 14 '22 02:01 jayce-incognito

I have my index.thread.js in the top level of the project (with the package.json), and just run new Thread('index.thread.js')

jacobp100 avatar Apr 04 '22 17:04 jacobp100