Answer the question
In order to leave comments, you need to log in
Problem with Push, how to solve?
I used the deployment instructions from Heroku, I also looked for a solution to the problem on the forums, everything was past.
When writing, I get the following error:
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/[email protected]/api/api.go:241:15: undefined: http.NewRequestWithContext
remote: ../codon/tmp/cache/go-path/pkg/mod/github.com/!severe!cloud/vksdk/[email protected]/api/errors.go:846:5: undefined: errors.As
remote: ../codon/tmp/cache/go-path/pkg/mod/github.com/!severe!cloud/vksdk/[email protected]/api/errors.go:851:5: undefined: errors.As
remote: ../codon/tmp/cache/go-path/pkg/mod/github.com/!severe!cloud/vksdk/[email protected]/api/errors.go:917:5: undefined: errors.As
remote: ../codon/tmp/cache/go-path/pkg/mod/github.com/!severe!cloud/vksdk/[email protected]/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/*********'
Answer the question
In order to leave comments, you need to log in
In go.mod it was necessary to add:
// +heroku goVersion go1.15
Do you have a go.mod file in your project?
If not, create it properly.
If so, check what version of go is listed there and specify 1.15
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question