Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
22
rated 0 times [  23] [ 1]  / answers: 1 / hits: 125344  / 7 Years ago, sat, february 4, 2017, 12:00:00

SITUATION:



I follow this tutorial: https://cloud.google.com/nodejs/tutorials/bookshelf-on-compute-engine



Everything works fine until I do npm start and go to:



http://localhost:8080



I am met with the following text on the blank page:



Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.


Which makes no sense since I am using OAuth. I followed the link and read the page, but I have no GOOGLE-APPLICATION-CREDENTIALS field anywhere, and nothing about it in the tutorial.






QUESTION:



Could you please reproduce the steps and tell me if you get the same result ?



(takes 5 minutes)



If not, what could I have done wrong ?


More From » node.js

 Answers
17

Yes, I had the same error. It's annoying cause Google Cloud Platform docs for their getting started bookshelf tutorial does not mention this anywhere. Which means that any new developer who tries this tutorial will see this error.



Read this:
https://developers.google.com/identity/protocols/application-default-credentials



I fixed this issue by running:
gcloud auth application-default login



In order to run thisgcloud auth application-default login
Visit: https://cloud.google.com/sdk/install
1) You have to install sdk into your computer
2) That will enable you to run the code
3) Log in to your associated gmail account then you are good to go!



This will make you login, and after that you code locally will use that authentication.


[#59068] Thursday, February 2, 2017, 7 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ayleen

Total Points: 447
Total Questions: 88
Total Answers: 109

Location: Belize
Member since Mon, Jun 20, 2022
2 Years ago
;