首页 > 解决方案 > 我似乎无法在 vsc 上将代码推送到 heroku

问题描述

我正在阅读 Django for Beginners 并且在书中您需要将代码推送到 heroku 但是当我尝试将其推送到 heroku 时,我得到一个看起来像这样的错误

    Enumerating objects: 26, done.
Counting objects: 100% (26/26), done.
Delta compression using up to 4 threads
Compressing objects: 100% (25/25), done.
Writing objects: 100% (26/26), 3.85 KiB | 171.00 KiB/s, done.
Total 26 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Building on the Heroku-20 stack
remote: -----> Determining which buildpack to use for this app
remote:  !     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
remote:
remote:  !     Push failed
remote:  !
remote:  ! ## Warning - The same version of this code has already been built: 49cd9b70adce6b44ee89a1fddec675d04bc4300d
remote:  !
remote:  ! We have detected that you have triggered a build from source code with version 49cd9b70adce6b44ee89a1fddec675d04bc4300d
remote:  ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote:  !
remote:  !
remote:  !     git push heroku <branchname>:main
remote:  !
remote:  ! This article goes into details on the behavior:
remote:  !   https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: !       Push rejected to vast-basin-51044.
remote:
To https://git.heroku.com/vast-basin-51044.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/vast-basin-51044.git'

我知道我已经正确完成了其他步骤,但似乎我错过了一些东西。

标签: pythondjangoherokuvisual-studio-code

解决方案


推荐阅读