##15 ERROR: executor failed running [/bin/bash -ol pipefail -c go build -o out]: exit code: 2

7 messages · Page 1 of 1 (latest)

humble wraith
#

Project ID: 6f4ac3de-1f63-4860-b3a6-b4b2a6655c52

I am attempting to deploy a simple golang project and it's getting stuck in the build phase. I'm wondering if it's because my project isn't at the root but rather within /api?

Thanks!

#15 [stage-0 8/8] RUN --mount=type=cache,id=s/81bd3532-1957-4c29-93e2-35a3f3d02723-/root/cache/go-build,target=/root/.cache/go-build go build -o out
#15 sha256:2fcf1b4f8619e190c737f477845516b1c4d80d62788e0ccf9380de8d2846c11b
 
#15 0.827 # github.com/Ocrah/secret/routes
#15 0.827 routes/consumer.go:17:18: undefined: kafka.NewConsumer
#15 0.827 routes/consumer.go:17:37: undefined: kafka.ConfigMap
#15 0.827 routes/producer.go:14:18: undefined: kafka.NewProducer
#15 0.827 routes/producer.go:14:37: undefined: kafka.ConfigMap
#15 0.827 routes/producer.go:36:34: undefined: kafka.Event
#15 0.827 routes/producer.go:43:25: undefined: kafka.Message
#15 0.827 routes/producer.go:44:25: undefined: kafka.TopicPartition
#15 0.827 routes/producer.go:44:72: undefined: kafka.PartitionAny
#15 0.827 note: module requires Go 1.20
 
#15 ERROR: executor failed running [/bin/bash -ol pipefail -c go build -o out]: exit code: 2
-----
> [stage-0 8/8] RUN --mount=type=cache,id=s/81bd3532-1957-4c29-93e2-35a3f3d02723-/root/cache/go-build,target=/root/.cache/go-build go build -o out:
-----
executor failed running [/bin/bash -ol pipefail -c go build -o out]: exit code: 2
 
Error: Docker build failed
fluid falconBOT
#

Project ID: 6f4ac3de-1f63-4860-b3a6-b4b2a6655c52,81bd3532-1957-4c29-93e2-35a3f3d02723,81bd3532-1957-4c29-93e2-35a3f3d02723

fathom shadow
#

set the root to /api then

humble wraith
#

the root is set to /api... (in the project settings)

fathom shadow
#

try running go mod tidy then make it deploy again

humble wraith
#

Was already tidy… switched to digital ocean. Thanks for your help