当我推送到heroku master
时,出现以下错误:
=!= There were problems parsing your heroku.yml. We've detected the following issues:
remote:
remote: "build" must validate one and only one schema (oneOf). Found none valid
remote:
remote: build.web in body is a forbidden property
remote:
remote: build.docker in body is a forbidden property
remote: Verifying deploy...
remote:
remote: ! Push rejected to radiant-crag-94686.
remote:
To https://git.heroku.com/radiant-crag-94686.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/radiant-crag-94686.git'
我的
heroku.yml
是这个,看起来像在Heroku开发中心上:setup:
addons:
- plan: heroku-postgresql
build:
docker:
web: Dockerfile
release:
image: web
command:
- python manage.py collectstatic --noinput
run:
web: gunicorn bookstore_project.wsgi
我尝试删除该应用程序并创建一个新应用程序,但仍然是相同的错误。
最佳答案
您可以仔细检查heroku.yml
文件上的缩进吗?我遇到了.web in body is a forbidden property
错误,并通过缩进run
下面的网络媒体资源来解决它。我会检查docker属性是否相同。我不确定其他错误。
关于git - 解析heroku.yml时出现问题-build.web是一个禁止的属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62114241/