I want to deploy beego on Heroku. The steps is:
-
Create new project with bee tool
$ bee new myproject
-
Change to GOPATH
$ cd %GOPTH%\src
-
Clone my heroku app.
$ git clone https://git.heroku.com/{APP_NAME}.git
-
Copy all files from my beego project to heroku app folder.
$ xcopy %GOPATH%\src\myproject\* %GOPATH%\src\{APP_NAME} /s /i
-
Fetching not already dependency
$ govendor fetch github.com/astaxie/beego
-
Push source code
$ git push heroku master
remote: -----> Go app detected remote: -----> Checking vendor/vendor.json file. remote: !! The 'heroku.goVersion' field is not specified in 'vendor/vendor.json'. remote: !! remote: !! Defaulting to go1.11.2 remote: !! remote: !! For more details see: https://devcenter.heroku.com/articles/go-apps-with-govendor#build-configuration remote: !! remote: -----> Using go1.11.2 remote: !! Installing package '.' (default) remote: !! remote: !! To install a different package spec set 'heroku.install' in 'vendor/vendor.json' remote: !! remote: !! For more details see: https://devcenter.heroku.com/articles/go-apps-with-govendor#build-configuration remote: !! remote: -----> Fetching any unsaved dependencies (govendor sync) remote: -----> Running: go install -v -tags heroku . remote: main.go:5:2: cannot find package "github.com/astaxie/beego" in any of: remote: /tmp/tmp.XOWyIa6r7h/.go/src/github.com/heroku/go-getting-started/vendor/github.com/astaxie/beego (vendor tree) remote: /app/tmp/cache/go1.11.2/go/src/github.com/astaxie/beego (from $GOROOT) remote: /tmp/tmp.XOWyIa6r7h/.go/src/github.com/astaxie/beego (from $GOPATH) remote: main.go:4:2: cannot find package "myproject/routers" in any of: remote: /tmp/tmp.XOWyIa6r7h/.go/src/github.com/heroku/go-getting-started/vendor/myproject/routers (vendor tree) remote: /app/tmp/cache/go1.11.2/go/src/myproject/routers (from $GOROOT) remote: /tmp/tmp.XOWyIa6r7h/.go/src/myproject/routers (from $GOPATH) remote: ! Push rejected, failed to compile Go app.
I don't know how to fix it. Has anyone encountered the similar problem?
Environment
- Windows 10
- go version go1.9.3 windows/amd64
- Beego : 1.10.1