0

I'm getting below error when trying to launch the application.

This is after I deleted node_modules and re-ran npm i to pull packages again

App threw an error during load
node_modules/electron/dist/resources/default_app.asar/main.js:113
Error: Cannot find module '/home/korodarn/projects/mygit/sight-words-solid-electron/node_modules/stt/lib/binding/v1.4.0/linux-x64/electron-v17.4/stt.node'
Require stack:
- /home/korodarn/projects/mygit/sight-words-solid-electron/node_modules/stt/index.js
- /home/korodarn/projects/mygit/sight-words-solid-electron/dist/main/index.cjs
- /home/korodarn/projects/mygit/sight-words-solid-electron/node_modules/electron/dist/resources/default_app.asar/main.js
- 
    at Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
    at Function.n._resolveFilename (node:electron/js2c/browser_init:249:1105)
    at Module._load (node:internal/modules/cjs/loader:785:27)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/korodarn/projects/mygit/sight-words-solid-electron/node_modules/stt/index.js:24:17)
    at Module._compile (node:internal/modules/cjs/loader:1116:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)

I've tried electron-rebuild ( invoked with node_modules/.bin/electron-rebuild ) and it completes successfully but it seems to only rebuild the canvas dependency based on the output.

I am not able to follow the coqui stt documentation well enough to know where to go next.

Matthew Swaringen
  • 305
  • 1
  • 2
  • 10
  • Please clarify by [edit]ing your question: (1) the error message you've shared is incomplete. What is the complete error message? (2) You say you've used `electron-rebuild` but moved the binary from `v16.0` manually to `v17.4`? What did you use `electron-rebuild` on? Please include how you invoked `electron-rebuild`. (3) Have you tried re-installing your `stt` dependency? Thanks! – Alexander Leithner Dec 30 '22 at 09:11
  • 1) Added the additional error information. 2) I just used node_modules/.bin/electron-rebuild to invoke. I have no clue what I'm doing there. It's not a tool I'm really familiar with using. 3) I decided to go further and just delete node_modules and do a clean npm i. This may be a mistake, because I was using a github vite/electron/solid template as my initial environment and I had to manually pull vite and vite-plugin-solid as dependency resolution failed after that, but everything is in the package.json now, and I get same error as before for now. – Matthew Swaringen Dec 31 '22 at 07:52
  • Oh, and the part about manually moving binaries is no longer relevant due to resetting node_modules. The file it says doesn't exist doesn't exist, but I have no clue how to create it. – Matthew Swaringen Dec 31 '22 at 07:53
  • I was able to fix my app (but I'd still like to understand rebuild process better) by updating package.json to have electron set to 16.0 (then removing node_modules and using npm i to get everything back) and then manually copying the v16.0 folder to v16.2 when I got the error that stt.node was missing in v16.2 I guess the ABI? didn't change in a way that was breaking it for that. – Matthew Swaringen Dec 31 '22 at 08:53

0 Answers0