Import "google/api/annotations.proto" was not found or had errors. How do I add it as a dependency?


Following the docs on how to set up a gRPC gateway, I find myself stuck at step four of generating the grpc gateway.

Namely, things fall apart when the following line is added:

import "google/api/annotations.proto";

The documentation says You will need to provide the required third party protobuf files to the protoc compiler – but not actually how do do so.

How do I add google/api/annotations.proto as a dependency?


I solved it one way by adding third party google apis and its content to the root of my project.

Feels wrong, but apparently this is encouraged

Answered By – cbll

Answer Checked By – Dawn Plyler (GoLangFix Volunteer)

Leave a Reply

Your email address will not be published.