gpt4 book ai didi

node.js - Node.js错误: Cannot find module '.-audio'

转载 作者:太空宇宙 更新时间:2023-11-03 22:07:18 25 4
gpt4 key购买 nike

Error: Cannot find module '.-audio'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (F:\Stage_ete_2018_XperMedia\2eme stage\transcription-service-master\bin\lib\job.js:6:25)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)

我已经这样做了:npm 安装npm 安装-音频

然后在执行 google-cloud 错误弹出窗口等之后,如果安装一个模块,则会弹出另一个模块。

最佳答案

npm install -audio

这不会执行任何操作,它会忽略以 - 开头的不存在选项。 NPM 也没有给出错误,因为我尝试使用 -something_that_does_exists_for_sure 作为选项。

我猜你想安装音频包:https://github.com/audiojs/audio

npm install audio
+ audio@1.2.0
added 2 packages in 1.97s

它应该显示它添加了两个软件包,我认为你还没有安装它。

此外,我不明白您的错误中的 .-:

Error:Cannot find module '.-audio'

下面是 audio package readme 中的代码示例: 。看它没有点,也没有减号。

const Audio = require('audio')

Audio.load('./sample.mp3').then(audio =>
audio
.trim()
.normalize()
.fade(.5)
.fade(-.5)
.save('sample-edited.wav')
)

我想您还需要从代码中删除它们。仅当您想要从某个目录获取文件时才需要点,对于使用 NPM 安装的软件包则不需要。

关于node.js - Node.js错误: Cannot find module '.-audio' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52036725/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com