Today in cloudcats I am providing the ProjectId via the PROJECT_ID env var. I also have to provide a keyfile, which I was passing into the code. In an effort to make things a little more smooth on the config side, I tried to use GOOGLE_APPLICATION_CREDENTIALS instead of defining PROJECT_ID and the keyfile. The projectId is inside of my keyfile - but we still seem to require the ProjectId along with the key file :(
beckwith-macbookpro:web beckwith$ npm start
> [email protected] start /Users/beckwith/Code/cloudcats/web
> GOOGLE_APPLICATION_CREDENTIALS=keyfile.json node server.js
info: Server running at: http://0.0.0.0:8080
ERROR:@google-cloud/trace-agent: Unable to acquire the project number from metadata service. Please provide a valid project number as an env. variable, or through config.projectId passed to start(). Error: getaddrinfo ENOTFOUND metadata.google.internal metadata.google.internal:80
ERROR:@google-cloud/debug-agent: The project ID could not be determined: getaddrinfo ENOTFOUND metadata.google.internal metadata.google.internal:80
Can we just read the projectId from the keyfile?
Today in cloudcats I am providing the ProjectId via the PROJECT_ID env var. I also have to provide a keyfile, which I was passing into the code. In an effort to make things a little more smooth on the config side, I tried to use GOOGLE_APPLICATION_CREDENTIALS instead of defining PROJECT_ID and the keyfile. The projectId is inside of my keyfile - but we still seem to require the ProjectId along with the key file :(
Can we just read the projectId from the keyfile?