Anyone know backbone.js? Getting an 'Uncaught ReferenceError'

I’m using this code:

   <!DOCTYPE html>
    <meta charset="utf-8">
    <script src=""></script>
    <script src=""></script>
    <script src=""></script>
    <script src=""></script>
    <link rel="stylesheet" href="">
    <script src="js/app.js"></script>
    <script src="js/routes.js"></script>
    <div id="app" class="container"><h1>Hello World!</h1></div>

Which produce this error when I type “backbone” into the console.

Uncaught ReferenceError: backbone is not defined
    at <anonymous>:2:1
    at Object.InjectedScript._evaluateOn (<anonymous>:895:140)
    at Object.InjectedScript._evaluateAndWrap (<anonymous>:828:34)
    at Object.InjectedScript.evaluate (<anonymous>:694:21)

Every page I’ve looked at suggests it’s related to the script tag order, specifically that underscore.js has to be loaded before the backbone.js file, which it is, as you can see below.

Can anyone offer me any suggestions as to where to look?

Sorry, can I have a bit of background - why are you typing “backbone” into the console?

Part of something I’m taking an look at, and it was suggested I do so. It should come up with some details of the version of backbone that has been loaded.

OK, problem solved. It should have been “Backbone”, not “backbone” :blush:

And many thanks to @jeffreylees too

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.