SITUATION:
I follow this tutorial: https://cloud.google.com/nodejs/tutorials/bookshelf-on-compute-engine
Everything works fine until I do
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) });