Heroku node.js应用程序与buildpack不兼容

时间:2017-08-14 11:30:05

标签: javascript node.js git heroku discord

我今天尝试将我的discord bot上传到heroku,但每次使用git push heroku master时都会出现以下错误:

remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack: https://codon-
buildpacks.s3.amazonaws.com/buildpacks/heroku/nodejs.tg
remote:        More info: 
https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to sjak-bot.
remote:
To https://git.heroku.com/sjak-bot.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/sjak-bot.git'

我已经做过heroku buildpacks:set heroku/nodejs,将node.js和npm版本添加到package.json中,但它仍然会出现同样的错误。

机器人是用javascript btw编写的

1 个答案:

答案 0 :(得分:0)

您应该将index.js文件添加到主目录,在我的情况下,我刚添加了index.php文件