Heroku没有检测到语言



我正试图将一个非常简单的Flask应用程序推送到Heroku,并获得以下内容:

No default language could be detected for this app.
remote:             HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
remote:             See https://devcenter.heroku.com/articles/buildpacks

我以前部署过一些,从未遇到过这个问题。

我尝试指定官方的Heroku/Python构建包,但遇到了不同的错误,所以我恢复了(实际上,通过Heroku的界面删除并重新创建了应用程序(。

这是我的应用程序目录中的树:

├── Pipfile
├── Pipfile.lock
├── Procfile
├── runtime.txt
└── simple_app
├── app.py
├── .env
└── __init__.py

您必须在项目的主文件夹中创建一个"package.json"文件

{
"engines": {
"yourlenguage": "yourversion"
},
"scripts": {
"start": "python yourfile / node yourfile / ..."
}
}

最新更新