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

我今天尝试上传我的不和机器人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写的

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