keldenl/gpt-llama.cpp

ERR_MODULE_NOT_FOUND

ZERO-A-ONE opened this issue · 3 comments

When I tried to use it, I got the following error, and I confirmed that the file in question actually existed

syc@ubuntu:~/llama/gpt-llama.cpp$ npm start

> gpt-llama.cpp@0.2.5 start
> node index.js

node:internal/errors:465
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/syc/llama/gpt-llama.cpp/chatEngine/initializeChatEngine.js' imported from /home/syc/llama/gpt-llama.cpp/routes/chatRoutes.js
    at new NodeError (node:internal/errors:372:5)
    at finalizeResolution (node:internal/modules/esm/resolve:405:11)
    at moduleResolve (node:internal/modules/esm/resolve:966:10)
    at defaultResolve (node:internal/modules/esm/resolve:1176:11)
    at ESMLoader.resolve (node:internal/modules/esm/loader:605:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:318:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:80:40)
    at link (node:internal/modules/esm/module_job:78:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v18.0.0

No error reported during installation

added 130 packages, and audited 131 packages in 2s

13 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

The error is caused by the folder name being ChatEngine instead of the coded chatEngine. Renaming the folder to chatEngine fixes the issue.

ah shoot my bad, i renamed the folder but linter didn't throw an error on the imports. just merged the fix (42f9316) so please full and try again!

Works now