[ERR_MODULE_NOT_FOUND]: Cannot find module node_modules/fs/promises
B1gM8c opened this issue · 1 comments
B1gM8c commented
When I got an error running npm start, I tried npm install and it worked fine.
npm start
> gpt-llama.cpp@0.1.9 start
> node index.js
internal/process/esm_loader.js:74
internalBinding('errors').triggerUncaughtException(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/www/gpt-llama.cpp/node_modules/fs/promises' imported from /www/gpt-llama.cpp/utils.js
at finalizeResolution (internal/modules/esm/resolve.js:285:11)
at moduleResolve (internal/modules/esm/resolve.js:708:10)
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:798:11)
at Loader.resolve (internal/modules/esm/loader.js:100:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:246:28)
at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:47:40)
at link (internal/modules/esm/module_job.js:46:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
B1gM8c commented
It was my issue. I used npm install -g n and then switched to version 18 by using n 18. Everything is working fine now. Sorry for the trouble!