Common troubleshooting errors and resolution steps for TurbineGo.
go mod init for new Turbine streaming applications
Golang expects a particular directory structure for Golang development environment, aka "Workspaces", particularly for locating private dependencies. GOPATH indicates where source code and modules should be found. Depending on how you want to build Golang binaries, you may want to set GOROOT Setting GO111MODULE, GOPROXY, GONOPROXY, and GOPRIVATE environment variables indicates your preferences for module management.
Turbine skips steps that are likely to fail in order to complete as many steps of the application initialization as possible. You may need to run these skipped steps manually, depending on which one of the following remedies you choose. If you do not use one of these remedies, or if you use a directory immediately under
$GOPATH, you will encounter this error from Go:
go: cannot determine module path for source directory `/path/to/liveapp` (outside `GOPATH`, module path must be specified)
Initialize a new application under
$GOPATH/src, or better yet under
$GOPATH/src/github.com/my-org. If you haven't made any code changes to your application, this is the easiest option. You won't need to run any manual steps in the new directory in this case.
Move your new application directory under at least
$GOPATH/src, or better yet
$ mv ~/liveapp $GOPATH/src/github.com/my-org
Keep the code where it is, but create a logical link under
$ ln -sf ~/liveapp $GOPATH/src/github.com/my-org/liveapp
Finally, manually run the steps that were skipped.
$ go mod init $ go get github.com/meroxa/turbine-go $ go get github.com/meroxa/turbine-go/runner # And either $ go mod download # or $ go mod vendor
An example of what that output will look like:
$ git status On branch main nothing to commit, working tree clean $ go mod init go: creating new go.mod: module my-data-app go: to add module requirements and sums: go mod tidy $ go get github.com/meroxa/turbine-go go: added github.com/meroxa/turbine-go v0.0.0-20220712011240-51913fd92155 go: added github.com/tidwall/gjson v1.14.1 go: added github.com/tidwall/match v1.1.1 go: added github.com/tidwall/pretty v1.2.0 go: added github.com/tidwall/sjson v1.2.4 $ go get github.com/meroxa/turbine-go/runner $ go mod download $ git status On branch main Untracked files: (use "git add <file>..." to include in what will be committed) go.mod go.sum
Other Turbine Errors
If you are running into any other errors related to Turbine, see the Turbine Troubleshooting documentation.