leon-ai / leon

🧠 Leon is your open-source personal assistant.
https://getleon.ai
MIT License
15.5k stars 1.28k forks source link

Error: Cannot find module '/leon/node_modules/stt/lib/binding/v1.4.0/linux-x64/node-v108/stt.node' #426

Open JackTheMico opened 2 years ago

JackTheMico commented 2 years ago

Specs

Expected Behavior

Offline stt can work properly

Actual Behavior

Leon popup the error after npm start command.

.: STT :.
✅ New instance
ℹ️  Initializing STT...
node:internal/modules/cjs/loader:946
  const err = new Error(message);
              ^

Error: Cannot find module '/home/dlwxxxdlw/codes/jackdeng/leon/node_modules/stt/lib/binding/v1.4.0/linux-x64/node-v108/stt.node'
Require stack:
- /home/dlwxxxdlw/codes/jackdeng/leon/node_modules/stt/index.js
- /home/dlwxxxdlw/codes/jackdeng/leon/server/dist/stt/coqui-stt/parser.js
- /home/dlwxxxdlw/codes/jackdeng/leon/server/dist/stt/stt.js
- /home/dlwxxxdlw/codes/jackdeng/leon/server/dist/core/http-server/server.js
- /home/dlwxxxdlw/codes/jackdeng/leon/server/dist/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:946:15)
    at Module._load (node:internal/modules/cjs/loader:787:27)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/dlwxxxdlw/codes/jackdeng/leon/node_modules/stt/index.js:24:17)
    at Module._compile (node:internal/modules/cjs/loader:1112:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1166:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:834:12)
    at Module.require (node:internal/modules/cjs/loader:1012:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/dlwxxxdlw/codes/jackdeng/leon/node_modules/stt/index.js',
    '/home/dlwxxxdlw/codes/jackdeng/leon/server/dist/stt/coqui-stt/parser.js',
    '/home/dlwxxxdlw/codes/jackdeng/leon/server/dist/stt/stt.js',
    '/home/dlwxxxdlw/codes/jackdeng/leon/server/dist/core/http-server/server.js',
    '/home/dlwxxxdlw/codes/jackdeng/leon/server/dist/index.js'
  ]
}

Node.js v18.4.0

How Do We Reproduce?

  1. Clone leon repo on a Manjaro machine.
  2. Run npm run setup:offline.
  3. Run npm start.

Extra (like a sample repo to reproduce the issue, etc.)

image There's only node-v102 for stt@1.4.0 , don't know why leon asked for node-v108

louistiti commented 2 years ago

Hi @JackTheMico, thanks for reporting. Can you please try with a Node.js 16 version? On a side note, Leon requires Python 3.9.10 and you are using 3.10.5.

JackTheMico commented 2 years ago

image Tried, popup a new error.

janmechtel commented 1 year ago

Had the same first error and it disappear after going to node v16.16.0