Could not load the default credentials? (Node.js Google Compute Engine tutorial)

后端 未结 14 1589
情话喂你
情话喂你 2020-12-04 19:20

SITUATION:

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

Everything works fine until I do

14条回答
  •  时光取名叫无心
    2020-12-04 19:29

    use this to solve your issue. this actually works:- just put credential parameter and give reference to your key to it.

    const serviceAccount = require('../key.json');
    admin.initializeApp({
        credential: admin.credential.cert(serviceAccount)
    });
    

提交回复
热议问题