NodeJS:模块未自注册

时间:2019-05-29 03:31:20

标签: node.js npm

我正在尝试IBM Watson的Speech to Text API。运行NodeJS应用程序时,我得到了这个。

除了IBM Watson的SpeechToText包之外,我还使用line-in包在输出中流式传输输入音频数据。

我尝试删除node_modules$ npm install$ npm rebuild。什么都没用。

node app.js
internal/modules/cjs/loader.js:718
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: Module did not self-register.
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:718:18)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (F:\Topgear\SpeechToText\node_modules\line-in\index.js:2:20)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)```

package.json
{
  "name": "SpeechToText",
  "version": "1.0.0",
  "description": "",
  "main": "app.js",
  "dependencies": {
    "dotenv": "^8.0.0",
    "line-in": "^0.1.2",
    "watson-developer-cloud": "^4.0.1"
  },
  "devDependencies": {},
  "scripts": {
    "test": "mocha"
  },
  "keywords": [],
  "author": "Nikhilesh AS",
  "license": "ISC"
}

0 个答案:

没有答案