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

Selected file will not load #36

Open
fezzzza opened this issue Feb 24, 2024 · 12 comments
Open

Selected file will not load #36

fezzzza opened this issue Feb 24, 2024 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@fezzzza
Copy link

fezzzza commented Feb 24, 2024

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.

@scsmash3r
Copy link

image
Same on Win 11 23H2 - won't load any files.

@scsmash3r
Copy link

Issue still persists in a tagged v.1.1.1
There was a report that gives a sight on that one: #25 (comment)

Current workaround would be:

  1. Go to resources\app\src\ folder
  2. Edit file api.js on line 149:
  const worker = new Worker('./resources/app/src/service/worker.js');
  1. Re-run chatd.exe - should be able to upload documents now and do the prompt.

@Jackxwb
Copy link

Jackxwb commented Mar 7, 2024

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)

image

@didikrm
Copy link

didikrm commented Mar 17, 2024

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.

@scsmash3r
Copy link

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.

@didikrm
Copy link

didikrm commented Mar 18, 2024

This was my typo. It still shows an error msg that it can't find the module.

@jjohnlaw
Copy link

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

@bgruszka
Copy link

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

@BruceMacD BruceMacD added the bug Something isn't working label Mar 21, 2024
@BruceMacD BruceMacD self-assigned this Mar 21, 2024
@didikrm
Copy link

didikrm commented Mar 22, 2024

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

@justarmadillo
Copy link

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

@edemir206
Copy link

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" ?

@glhr
Copy link

glhr commented Jun 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants