re-incarnation
@re-incarnation

Проблема с Push, как решить?

Использовал инструкцию деплоя от хероку, так же искал решение проблемы на форумах, всё мимо.
При пише прилетает подобная ошибка:
remote: note: module requires Go 1.13
remote:  !     Push rejected, failed to compile Go app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !	Push rejected to m-rp0assistant.
remote: 
To https://git.heroku.com/m-rp0assistant.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/************'
</blockquote>

Ну а вот весь лог пуша:
<blockquote>Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 4 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 1.97 KiB | 1007.00 KiB/s, done.
Total 5 (delta 0), 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: -----> Go app detected
remote: -----> Fetching jq... done
remote: -----> Fetching stdlib.sh.v8... done
remote: -----> 
remote:        Detected go modules via go.mod
remote: -----> 
remote:        Detected Module Name: conf-helper
remote: -----> 
remote:  !!    The go.mod file for this project does not specify a Go version
remote:  !!    
remote:  !!    Defaulting to go1.12.17
remote:  !!    
remote:  !!    For more details see: https://devcenter.heroku.com/articles/go-apps-with-modules#build-configuration
remote:  !!    
remote: -----> New Go Version, clearing old cache
remote: -----> Installing go1.12.17
remote: -----> Fetching go1.12.17.linux-amd64.tar.gz... done
remote: -----> Determining packages to install
remote:        
remote:        Detected the following main packages to install:
remote:        		conf-helper
remote:        
remote: -----> Running: go install -v -tags heroku conf-helper 
remote: github.com/SevereCloud/vksdk/v2
remote: golang.org/x/text/encoding/internal/identifier
remote: golang.org/x/text/transform
remote: github.com/SevereCloud/vksdk/v2/object
remote: golang.org/x/text/encoding
remote: golang.org/x/text/encoding/internal
remote: golang.org/x/text/encoding/charmap
remote: golang.org/x/text/runes
remote: github.com/SevereCloud/vksdk/v2/internal
remote: github.com/SevereCloud/vksdk/v2/events
remote: github.com/SevereCloud/vksdk/v2/api
remote: # github.com/SevereCloud/vksdk/v2/api
remote: ../codon/tmp/cache/go-path/pkg/mod/github.com/!severe!cloud/vksdk/v2@v2.9.1/api/api.go:241:15: undefined: http.NewRequestWithContext
remote: ../codon/tmp/cache/go-path/pkg/mod/github.com/!severe!cloud/vksdk/v2@v2.9.1/api/errors.go:846:5: undefined: errors.As
remote: ../codon/tmp/cache/go-path/pkg/mod/github.com/!severe!cloud/vksdk/v2@v2.9.1/api/errors.go:851:5: undefined: errors.As
remote: ../codon/tmp/cache/go-path/pkg/mod/github.com/!severe!cloud/vksdk/v2@v2.9.1/api/errors.go:917:5: undefined: errors.As
remote: ../codon/tmp/cache/go-path/pkg/mod/github.com/!severe!cloud/vksdk/v2@v2.9.1/api/errors.go:922:5: undefined: errors.As
remote: note: module requires Go 1.13
remote:  !     Push rejected, failed to compile Go app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !	Push rejected to m-rp0assistant.
remote: 
To https://git.heroku.com/m-rp0assistant.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/*********'
  • Вопрос задан
  • 485 просмотров
Решения вопроса 1
re-incarnation
@re-incarnation Автор вопроса
В go.mod нужно было дописать:
// +heroku goVersion go1.15

Подробнее можно прочитать здесь!
Ответ написан
Комментировать
Пригласить эксперта
Ответы на вопрос 1
У вас в проекте есть файл go.mod?
Если нет, создайте его по всем правилам.
Если есть, проверьте, какая там версия go указана и укажите 1.15
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы