Issue with Forking Tyk


Im currently trying to fork tyk, to my repo, and build it and im getting the following error:

./tyk_reverse_proxy_clone.go:147: spec.APIDefinition.Proxy.TargetList undefined (type struct { PreserveHostHeader bool "bson:\"preserve_host_header\" json:\"preserve_host_header\""; ListenPath string "bson:\"listen_path\" json:\"listen_path\""; TargetURL string "bson:\"target_url\" json:\"target_url\""; StripListenPath bool "bson:\"strip_listen_path\" json:\"strip_listen_path\""; EnableLoadBalancing bool "bson:\"enable_load_balancing\" json:\"enable_load_balancing\""; Targets []string "bson:\"target_list\" json:\"target_list\""; StructuredTargetList tykcommon.HostList "bson:\"-\" json:\"-\""; CheckHostAgainstUptimeTests bool "bson:\"check_host_against_uptime_tests\" json:\"check_host_against_uptime_tests\""; ServiceDiscovery tykcommon.ServiceDiscoveryConfiguration "bson:\"service_discovery\" json:\"service_discovery\"" } has no field or method TargetList)

Anyone have any clue? I cannot find anything. If my gopath has it will build fine, but if i do something like it will not build any longer.


Hi Eric, are you using an updated version of tykcommon?
How are you building Tyk?


I could be. I’m using go get to get the dependencies, then running go build to build the binary


The build process seems fine, can you run:
go get -u
And test again?


Got the same error. So im building in
Whenever i build in it works fine.


I see, APIDefinition.Proxy.TargetList is not in tykcommon anymore, the field is APIDefinition.Proxy.StructuredTargetList.
I think you could try to update your fork, or fork tykcommon and use a previous version.