I'm building an API with Google Cloud functions and I had the same issue as the guy from this post: Could not load the default credentials? (Node.js Google Compute Engine tutorial)
When trying to use my API, I received this error:
Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
So I went on and followed the steps suggested in the question I mentioned. I downloaded the gcloud SDK, installed it, and at the end of the installation wizard there is an option to run the google cloud cli immediately.
I ran it successfully and logged in properly, now any time I open the command prompt I can use the gcloud command without a problem.
Mi issue is the following. I'm running my commands in VSCode bash terminal and I get an error saying that the gcloud command is not found.
My project is in my D: drive, and the SDK is on C:, which I believe is the reason why the gcloud command is not recognized when I attempt to use it.
Should/can I install the Google Cloud SDK in my D: drive and use it there, or should I move my project to the C: drive?
I read somewhere that this might be a problem with the bash terminal, but I tried running it from command prompt in VSCode and I get the same error, so I guess it's got nothing to do with it.
Thank you for your time.