1

I need some help please with my Dojo 1.7.2 custom build - the build works fine but returns an error in the browser.

Here's my profile file:

dependencies = {
    layers: [
            {
                    // This is a specially named layer, literally 'dojo.js'
                    // adding dependencies to this layer will include the modules
                    // in addition to the standard dojo.js base APIs.
                    name: "dojo.js",
                    dependencies: [
                            "dijit.registry",
                            "dijit.Dialog",
                            "dijit.Tooltip",
                            "dijit.form.Button",
                            "dijit.layout.ContentPane"
                    ]
            }
    ],

    prefixes: [
            [ "dijit", "../dijit" ],
            [ "dojox", "../dojox" ]
    ]

}

I don't think I need to add "digit.registry" - the generated dojo.js file doesn't change with or without it. I made it a dependency since I use digit.byId

here's how I build:

./build.sh -r --profile profiles/my.profile.js --releaseDir /my/release/directory

I then include the generated dojo.js in my html code. When the page loads, the javascript console reveals the error "_5c4 is not a function" when attempting to do something with digit.byId.

When I instead load the full Dojo from ajax.googleapis.com, everything works perfectly.

Should I be including ../dijit/dijit.js in the html as well?

Web Devie
  • 1,207
  • 1
  • 13
  • 30
  • dijit/dijit is sometimes built as a separate layer, but that's not necessary. The way you have it configured, all the intermediate dijit dependencies (dijit/_base/*, dijit/_Widget, etc.) should all be built into a single layer called dojo.js. You should not need to explicitly include dijit/dijit as a dependency, as it is already implied by the modules you've included. – peller Apr 12 '12 at 15:13

1 Answers1

0

check your spelling digit->dijit

peller
  • 4,435
  • 19
  • 21
  • Thanks, that was just a mistype. Profile file did not have "digit" – user1327474 Apr 12 '12 at 03:56
  • you should correct your question, above. Also, if you could provide a bit more context about the error -- can you identify the surrounding lines where _5c4 occurs? Is it your code or dojo's? – peller Apr 12 '12 at 15:10
  • The _5c4 error is in dojo.js. I also notice that the browser attempts to include selector/acme.js, which I didn’t move to the web server. I thought I only needed to move dojo.js? – user1327474 Apr 12 '12 at 17:58
  • You'd best move the entire tree to the webserver, at least you have the build working and know what's going on. In order to bake the selector/acme into your layer file, you need to use the selectorEngine option. You can find (a tutorial)[http://dojotoolkit.org/documentation/tutorials/1.7/build/] on the Dojo site. Related documentation links are found at the bottom of that tutorial – peller Apr 12 '12 at 22:18