DeepSpeech-examples icon indicating copy to clipboard operation
DeepSpeech-examples copied to clipboard

cannot find node_modules/deepspeech/lib/binding/v0.9.3/linux-x64/node-v93/deepspeech.node

Open raphael10-collab opened this issue 3 years ago • 7 comments

I'm having the same issue described here: https://github.com/mozilla/DeepSpeech-examples/issues/138

recognize-wav.mjs:

import DeepSpeech from 'deepspeech'

Executing:

node recognize-wav.mjs 
node:internal/modules/cjs/loader:933
  const err = new Error(message);
              ^

Error: Cannot find module '/home/raphy/Raphy-Template/node_modules/deepspeech/lib/binding/v0.9.3/linux-x64/node-v93/deepspeech.node'
Require stack:
- /home/raphy/Raphy-Template/node_modules/deepspeech/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/raphy/Raphy-Template/node_modules/deepspeech/index.js:24:17)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:190:29) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/raphy/Raphy-Template/node_modules/deepspeech/index.js' ]
}

node v16.13.0 which is the current LTS node version: https://nodejs.org/en/

How to make it work?

raphael10-collab avatar Feb 16 '22 17:02 raphael10-collab

It seems not to be compatible with NodeJs v16 , i downgraded to Node V14 and things worked.

dushimsam avatar Apr 20 '22 11:04 dushimsam

@dushimsam downgrading node's version shouldn't be the solution.

I had to, rightly, upgrade node's version to v. 16.13. because many of the packages and software I use required to keep up, things are rapidly evolving, and downgrading to two versions before, is nonsense to me

raphael10-collab avatar Apr 23 '22 09:04 raphael10-collab

@raphael10-collab Did you find a solution ?

Borr1 avatar Mar 03 '23 13:03 Borr1

Use Coqui ?

lissyx avatar Mar 03 '23 13:03 lissyx

@lissyx, this package is for transcribing speech, not generating it...

phunanon avatar Mar 03 '23 13:03 phunanon

according to node modules last node version supported is Node.js 15.14.0 you can get more info from https://nodejs.org/en/download/releases/

But after i decrease node version give me error since there are other package dependance on current node version

Tamer3mansor avatar Mar 15 '23 12:03 Tamer3mansor

did anyone manage to resolve this?

I am attempting to run on node version 16. Works fine in version 14 but not higher. I understand why it's not working but not how to resolve.

Running Node14 isn't an option as it's for an embedded solution and I have no control over the node version being used.

jbflow avatar Nov 27 '23 20:11 jbflow