Type Error connecting Firebase Storage in Node.js

1,281 views
Skip to first unread message

Matteo Fiorio

unread,
Dec 29, 2016, 10:22:13 AM12/29/16
to Firebase Google Group
Hi ! 

I'm trying to connect firebase storege to my app with node.js
I've followed the getting started guide:

bash: 
npm install --save firebase 

in my app.js:
var firebase = require('firebase');

var config = {
apiKey: " **************************** ",
authDomain: " **************************** ",
databaseURL: " **************************** ",
storageBucket: " **************************** "
};
firebase.initializeApp(config);
var storageRef = firebase.storage();

It's send me :

TypeError: firebase.storage is not a function


I can't understand. 

Ian Barber

unread,
Dec 29, 2016, 5:18:50 PM12/29/16
to Firebase Google Group
The admin SDK doesn't support storage - so its probably that! You can just use the regular Google Cloud Storage APIs from the server side though: https://cloud.google.com/nodejs/getting-started/using-cloud-storage

Jacob Wenger

unread,
Jan 3, 2017, 1:32:25 PM1/3/17
to fireba...@googlegroups.com
Just to clarify: neither of the Firebase Node.js SDKs (admin SDK and regular client SDK) support Firebase Storage. As Ian said, your best bet is to use the GCS API directly.

Cheers,
Jacob

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/4f21eb89-090d-40e3-8951-641bd14ecb23%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages