question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

_reduxReactFirebase.firebase.storage is not a function(…)

See original GitHub issue

How can I access the storage using the redux-react-firebase object? With the original firebase NPM works fine.

I’m trying like this: let imgRef = firebase.storage().child('posts/' + post.slug + '.jpg');

Thanks

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
RahavLussatocommented, Dec 27, 2016

@gazpachu its because the child function is not on storage is on storageref you need to change your code to something like:

let storageRef =  firebase.storage().ref();

let imgRef = storageRef.child(type + '/' + item.slug + '.jpg');
    imgRef.getDownloadURL().then(function(url) {
        this.refs[className+'-'+id+'-img'].src = url;
    }.bind(this)).catch(function(error) {
        console.log(error);
});

https://firebase.google.com/docs/storage/web/create-reference

0reactions
RahavLussatocommented, Jul 23, 2017

@gazpachu try to get firebase from props this.props.firebase and don’t forget to use the firebase decorator.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: firebase.storage is not a function - Stack Overflow
I faced the same problem. In my case, I needed to include storage module besides Firebase core. import firebase from 'firebase/app'; ...
Read more >
"firebase.storage is not a function" (web) · Issue #1265 - GitHub
When I run the code (see below) I get the console error: Uncaught TypeError: firebase.storage is not a function .
Read more >
JavaScript : TypeError: firebase.storage is not a function
JavaScript : TypeError: firebase. storage is not a function [ Gift : Animated Search Engine : https://bit.ly/AnimSearch ] JavaScript ...
Read more >
firebase-admin.storage package - Google
Emulator Suite · Authentication · Realtime Database · Firestore · Storage · ML · Hosting · Cloud Functions.
Read more >
react-redux-firebase - npm
Start using react-redux-firebase in your project by running `npm i ... and/or are not required to have your Firebase data loaded into redux, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found