Edward Potter
Edward Potter

Reputation: 3820

Super basic Firebase error, "Firebase is not defined"

I'm making the move into Firebase. But Day One I'm stumped with a simple one liner.

This is right from the demo:

var myDataRef = new Firebase('https://un2ubl6u7zs.firebaseio-demo.com/');

And returns in my Chrome Console:

enter image description here

This is from the demo link, but I get exactly the same response in the console for any firebase DB I create. It's probably something REALLY simple, just trying to wrap my brain around Firebase, it's very different coming from a decade in the SQL world.

Thanks for pointers. :-)

Upvotes: 1

Views: 1356

Answers (2)

guy mograbi
guy mograbi

Reputation: 28668

This will not work with the new client.

see upgrade guide: https://firebase.google.com/support/guides/firebase-web

enter image description here

Upvotes: 1

Frank van Puffelen
Frank van Puffelen

Reputation: 599706

You will only have access to Firebase, if you include the Firebase JavaScript client as a script:

<script src="https://cdn.firebase.com/js/client/2.4.0/firebase.js"></script>

This will make the Firebase object (and may others) available to your script.

I recommend that you start with this 5-minute interactive tutorial for Firebase. Adding the script tag is explain in step 1 there.

There was a similar question yesterday: Uncaught ReferenceError: Firebase is not defined

Upvotes: 1

Related Questions