Posts

Showing posts with the label error

Firebase Storage ApiError: Forbidden #299 ... ApiError: Forbidden at new util

Image
When, I want to utise firebstore for the frist time in the google cloud functions,  the main problem I had to face it the integration issue raise as follows.  The google firebase and the google cloud storage eveloved seperately and in order to use the clould storage in firebase functions, the special autherntication need to be grantted even you are using firebase admin sdk. ApiError: Forbidden at new util.ApiError (/user_code/node_modules/@google-cloud/storage/node_modules/@google-cloud/common/src/util.js:107:10) at Object.parseHttpRespMessage (/user_code/node_modules/@google-cloud/storage/node_modules/@google-cloud/common/src/util.js:149:33) I implemeted the firebase admin sdk as follows. const firebaseAdmin = require("firebase-admin"); firebaseAdmin.initializeApp(functions.config().firebase); And firebase cloud bucket implemented  as follows . const storageRoot = firebaseAdmin.storage().bucket() Google document also indicate authentication req

ENOENT: no such file or directory, rename : node_modules/async

Image
I have gone trough follwing error ,when I was updating npm. npm ERR! path /Users/interlectivethree/firebase/fetchme/server/node_modules/winston/node_modules/async npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall rename npm ERR! enoent ENOENT: no such file or directory, rename '/Users/interlectivethree/firebase/fetchme/server/node_modules/winston/node_modules/async' -> '/Users/interlectivethree/firebase/fetchme/server/node_modules/winston/node_modules/.async.DELETE' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR!     /Users/interlectivethree/.npm/_logs/2017-07-07T14_17_29_016Z-debug.log I have done sevarel things like package wise unstall and install ,package relocating .But no success .But I think compleate unstall and reinstall is the best option and follwing commands used. npm uninstall ` ls - 1 node_modules | tr '/\n' ' &#