Error: The include `google/api/annotations.proto` was not found.
See original GitHub issueThanks 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”:
- Search the issues already opened: https://github.com/googleapis/nodejs-firestore/issues
- Search the issues on our “catch-all” repository: https://github.com/GoogleCloudPlatform/google-cloud-node
- Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js
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
- 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” }
- 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:
- Created 5 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
globby
should be replaced in the most recent versions. 😃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 theannotations.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 insidegoogle-proto-files
outside intonode_modules
(which got rid of the error), but I think it has to do with theincludePath
passed togrpc.js
. Is this error due to some version mismatch on my side?Thank you so much!