question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: The include `google/api/annotations.proto` was not found.

See original GitHub issue

Thanks for stopping by to let us know something could be better!

Please run down the following list and make sure you’ve tried the usual “quick fixes”:

If you are still having issues, please be sure to include as much information as possible:

Environment details

  • OS: OSX
  • Node.js version: 7.1.0
  • npm version: 5.7.1
  • @google-cloud/firestore version:

Steps to reproduce

  1. My package.json “dependencies”: { “@sendgrid/mail”: “^6.2.1”, “config”: “^1.30.0”, “express”: “^4.16.2”, “express-serve-static-core”: “^0.1.1”, “firebase-admin”: “^5.12.0”, “firebase-functions”: “^1.0.1”, … }, “devDependencies”: { “@types/express”: “^4.0.37”, “tsc”: “^1.20150623.0”, “tslint”: “^5.8.0”, “typescript”: “^2.7.2” }
  2. When I try to locally build/ deploy my firebase project, I get the following error

'i functions: Preparing to emulate functions. Warning: You’re using Node.js v7.1.0 but Google Cloud Functions only supports v6.11.5. ⚠ functions: Failed to load functions source code. Ensure that you have the latest SDK by running npm i --save firebase-functions inside the functions directory. ⚠ functions: Error from emulator. Error occurred while parsing your function triggers.

Error: The include google/api/annotations.proto was not found. at Function.GoogleProtoFilesRoot._findIncludePath (/Users/himalrandeniya/Dropbox (Future Stars)/Apps/DMS/Sprout/Engine/Functions/functions/node_modules/google-gax/lib/grpc.js:312:11) at GoogleProtoFilesRoot.resolvePath (/Users/himalrandeniya/Dropbox (Future Stars)/Apps/DMS/Sprout/Engine/Functions/functions/node_modules/google-gax/lib/grpc.js:298:31) at process (/Users/himalrandeniya/Dropbox (Future Stars)/Apps/DMS/Sprout/Engine/Functions/functions/node_modules/google-gax/node_modules/protobufjs/src/root.js:112:45) at fetch (/Users/himalrandeniya/Dropbox (Future Stars)/Apps/DMS/Sprout/Engine/Functions/functions/node_modules/google-gax/node_modules/protobufjs/src/root.js:166:13) at GoogleProtoFilesRoot.load (/Users/himalrandeniya/Dropbox (Future Stars)/Apps/DMS/Sprout/Engine/Functions/functions/node_modules/google-gax/node_modules/protobufjs/src/root.js:194:13) at GoogleProtoFilesRoot.loadSync (/Users/himalrandeniya/Dropbox (Future Stars)/Apps/DMS/Sprout/Engine/Functions/functions/node_modules/google-gax/node_modules/protobufjs/src/root.js:235:17) at Object.loadSync (/Users/himalrandeniya/Dropbox (Future Stars)/Apps/DMS/Sprout/Engine/Functions/functions/node_modules/google-gax/node_modules/protobufjs/src/index-light.js:69:17) at GrpcClient.loadProto (/Users/himalrandeniya/Dropbox (Future Stars)/Apps/DMS/Sprout/Engine/Functions/functions/node_modules/google-gax/lib/grpc.js:164:14) at new FirestoreClientBuilder (/Users/himalrandeniya/Dropbox (Future Stars)/Apps/DMS/Sprout/Engine/Functions/functions/node_modules/@google-cloud/firestore/src/v1beta1/firestore_client.js:1412:37) at FirestoreClientBuilder (/Users/himalrandeniya/Dropbox (Future Stars)/Apps/DMS/Sprout/Engine/Functions/functions/node_modules/@google-cloud/firestore/src/v1beta1/firestore_client.js:1409:12)’ Following these steps will guarantee the quickest resolution possible.

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jkwluicommented, Jan 25, 2019

globby should be replaced in the most recent versions. 😃

1reaction
ZeBirdehcommented, May 6, 2018

I also happened to have this problem, and I just recently downloaded firebase.

So, I decided to dig around in the code and found that it was trying to look for the path google\api\annotations.proto by going through the parent directories of ...\functions\node_modules\@google-cloud\firestore\protos\google\firestore\v1beta1\firestore.proto (which I believe was the previous include?), but since the annotations.proto was inside ...\node_modules\google-proto-files\google\api\annotations.proto it couldn’t be found that way.

I did a temporary fix where I copied the google folder from inside google-proto-files outside into node_modules (which got rid of the error), but I think it has to do with the includePath passed to grpc.js. Is this error due to some version mismatch on my side?

Thank you so much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Import "google/api/annotations.proto" was not found or had ...
Sometimes this error occurs when we run protoc . try to import the dependency when running the protoc command.
Read more >
google/api/annotations.proto: File not found. #1935 - GitHub
I am trying to build a GRPC service with reverse proxy this worked fine before till i updated to the version 2 im...
Read more >
Import "google/api/annotations.proto" was ... - Google Groups
It seems that you are missing the google-API repository. You can clone it from here and then include it with -I. It is...
Read more >
Adding gRPC-Gateway annotations to an existing proto file
Now that we've got a working Go gRPC server, we need to add the gRPC-Gateway annotations. The annotations define how gRPC services map...
Read more >
Import googleapiannotations.proto was not found or had errors
解决:Import “google/api/annotations.proto” was not found or had errors. 一、问题概述. 在使用 protoc 命令的时候,很可能会出现这样的问题。
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found