如何解决Heroku上的“ pep dep missing”问题?

时间:2019-03-22 20:48:00

标签: heroku discord opus

当我在Heroku上安装node-opusdiscord.js并通过npm list运行heroku run bash时,出现以下警告:

  

npm错误!对等dep缺失:discord.js@11.4.2要求的node-opus@^0.2.7

我该如何解决?

这是我的package.json

{
  "name": "PrzegrywBOT",
  "description": "PrzegrywBOT",
  "version": "2.0.0",
  "engines": {
    "node": "10.15.0"
  },
  "main": "index.js",
  "scripts": {
    "start": "node index.js"
  },
  "dependencies": {
    "cheerio": "^1.0.0-rc.2",
    "discord.js": "^11.4.2",
    "ffmpeg": "0.0.4",
    "ffmpeg-binaries": "^4.0.0",
    "node-opus": "^0.3.1",
    "request": "^2.88.0",
    "simple-youtube-api": "^5.1.1",
    "superagent": "^4.1.0",
    "ytdl-core": "^0.29.1"
  }
}

1 个答案:

答案 0 :(得分:0)

我目前遇到相同的问题,这似乎与作品和heroku有关。

您是否尝试过安装这些buildpack?

您可以将它们安装在应用程序右侧的“设置”标签上,向下滚动并添加以下buildpack: https://elements.heroku.com/buildpacks/jonathanong/heroku-buildpack-ffmpeg-latest https://elements.heroku.com/buildpacks/dubsmash/heroku-buildpack-opus https://elements.heroku.com/buildpacks/crazycatz00/heroku-buildpack-libopus

让我知道它是否更改了任何内容