chatd
chatd copied to clipboard
Selected file will not load
In the latest release 1.1.0 on Linux Mint 21 Vanessa (~ Ubuntu 22.04), the selected file will not load, regardless of which filetype I select. The button contains the text Cannot find module '/[path/to]/chatd-linux-x64/src/service/worker.js'
where [path/to] is where I installed it. Chatd is useless without being able to load a file. Reverting to v1.0.1 is the workaround.
Same on Win 11 23H2 - won't load any files.
Issue still persists in a tagged v.1.1.1 There was a report that gives a sight on that one: https://github.com/BruceMacD/chatd/issues/25#issuecomment-1961340322
Current workaround would be:
- Go to
resources\app\src\
folder - Edit file
api.js
on line 149:
const worker = new Worker('./resources/app/src/service/worker.js');
- Re-run
chatd.exe
- should be able to upload documents now and do the prompt.
I have used the latest version (v1.1.1) currently available, and when I select to upload the file, it prompts "Cannot find module 'C:\tmp\chatd-win32-x64\src\service\worker.js'
When I switch to Resources\app in the CMD environment and run chatd.exe, when uploading the file, I will see "fetch failed" Prompt in CMD log
Error: TypeError [Error]: fetch failed
at Object.fetch (node:internal/deps/undici/undici:14152:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at runNextTicks (node:internal/process/task_queues:64:3)
at process.processImmediate (node:internal/timers:447:9)
at async getModelFile (file:///C:/tmp/chatd-win32-x64/resources/app/node_modules/@xenova/transformers/src/utils/hub.js:471:24)
at async getModelJSON (file:///C:/tmp/chatd-win32-x64/resources/app/node_modules/@xenova/transformers/src/utils/hub.js:575:18)
at async Promise.all (index 0)
at async loadTokenizer (file:///C:/tmp/chatd-win32-x64/resources/app/node_modules/@xenova/transformers/src/tokenizers.js:52:16)
at async AutoTokenizer.from_pretrained (file:///C:/tmp/chatd-win32-x64/resources/app/node_modules/@xenova/transformers/src/tokenizers.js:3940:48)
at async Promise.all (index 0)
at async loadItems (file:///C:/tmp/chatd-win32-x64/resources/app/node_modules/@xenova/transformers/src/pipelines.js:2694:5)
at async pipeline (file:///C:/tmp/chatd-win32-x64/resources/app/node_modules/@xenova/transformers/src/pipelines.js:2640:19)
at async embed (C:\tmp\chatd-win32-x64\resources\app\src\service\embedding.js:22:21)
at async MessagePort.<anonymous> (C:\tmp\chatd-win32-x64\resources\app\src\service\worker.js:10:24) {
cause: ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (node:internal/deps/undici/undici:7967:28)
at node:internal/deps/undici/undici:7925:50
at Immediate._onImmediate (node:internal/deps/undici/undici:7954:37)
at process.processImmediate (node:internal/timers:476:21)
Same issue with v 1.1.0 on Mac OS. Changed the path to the worker to './resource/app/src/service/worker.js' but still complaining and not loading the file.
Same issue with v 1.1.0 on Mac OS. Changed the path to the worker to './resource/app/src/service/worker.js' but still complaining and not loading the file.
Probably you forgot to add s
in resources
, so the correct path must be ./resources/app/src/service/worker.js
- recheck and try again.
This was my typo. It still shows an error msg that it can't find the module.
I had this issue mine worked by adding an absolute path to the file e.g for me it was
/Applications/chatd.app/Contents/Resources/app/src/service/worker.js
I had this issue mine worked by adding an absolute path to the file e.g for me it was
/Applications/chatd.app/Contents/Resources/app/src/service/worker.js
I had the same issue. @jjohnlaw this worked for me too :) thx
I had this issue mine worked by adding an absolute path to the file e.g for me it was
/Applications/chatd.app/Contents/Resources/app/src/service/worker.js
I had the same issue. @jjohnlaw this worked for me too :) thx
Worked for me as well. Thank you @jjohnlaw
I had this issue mine worked by adding an absolute path to the file e.g for me it was
/Applications/chatd.app/Contents/Resources/app/src/service/worker.js
worked thanks
I had this issue mine worked by adding an absolute path to the file e.g for me it was
/Applications/chatd.app/Contents/Resources/app/src/service/worker.js
This does not solve the problem for me, i'm using windows, should I use something like "C:\folder-where-is-worker\worker.js" ?
Same issue on Ubuntu 18.04:
Error: Cannot find module '/home/me/software/chatd-linux-x64/src/service/worker.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1054:15)
at Module._load (node:internal/modules/cjs/loader:900:27)
at f._load (node:electron/js2c/asar_bundle:2:13377)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:96:12)
at MessagePort.<anonymous> (node:internal/main/worker_thread:161:24)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:735:20)
at exports.emitMessage (node:internal/per_context/messageport:23:28) {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
@scsmash3r 's workaround fixed it