Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8176879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:21:38+00:00 2026-06-06T23:21:38+00:00

Using Dojo 1.7.2 Beginner to Dojo, trying to make a simple custom widget. I

  • 0

Using Dojo 1.7.2

Beginner to Dojo, trying to make a simple custom widget.

I have created a module with this definition, as per the tutorials:

define(['dojo/_base/declare', 'dijit/_Widget', 'dijit/_Templated', 'dojo/text!./templates/groupNode.html'], ...

And am calling it like so:

require(['modules/groupNode', 'dojo/domReady!'], ...

My dojoConfig looks like this:

var dojoConfig = {
    async: true,
    baseUrl: "./",
    packages: [
        { name: "dijit", location: "//ajax.googleapis.com/ajax/libs/dojo/1.7.2/dijit" },
        { name: "dojo", location: "//ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo" },
        { name: "modules", location: "modules" }
    ]
};

However, after the page has loaded, this module never finishes defining; when I examine the page source, I see that the script includes look like this:

<script type="text/javascript" charset="utf-8" src="modules/groupNode.js">
<script type="text/javascript" charset="utf-8" src="../dijit//_Widget.js">
<script type="text/javascript" charset="utf-8" src="../dijit//_Templated.js">

Clearly, the dijit modules didn’t compute the correct path, and aren’t loading correctly.

Other custom modules which only use dojo modules work correctly.

There are no errors logged in the console.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T23:21:41+00:00Added an answer on June 6, 2026 at 11:21 pm

    I have never used packages before within the configuration. I have always used modulePaths. Here is an example of configuring Dojo:

    <script src="//ajax.googleapis.com/ajax/libs/dojo/1.7/dojo/dojo.js" 
      data-dojo-config="
        isDebug: true, 
        parseOnLoad: false,
        baseUrl: '/',
        modulePaths: {modules: 'modules'}
    "></script>
    

    So this means that in the root of the web directory, there exists a child directory named modules and that is where your custom javascript exists.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using dojo and dijit and have an inlineEditBox widget. I'm trying to capture
I am stuck with using Dojo to accomplish this. Basically what I am trying
I have started using Dojo's new on module to add my events. It works
I'm trying to build a web app using Dojo. I have a form that
I'm trying to make a request using dojo.xhrGet to grab some XML data from
I'm using DOJO v1.7.2. I've created Datagrid in Dialog widget declaratively. I've included needed
I am using a dojo column chart. I want to add a custom line
I'm using dojo. I've got something like this: <a id=fooBar onclick=foo();bar();>Foo then Bar</a> I
I have been using Dojo hosted on Google's CDN. I just downloaded the development
I'm using Dojo trying to build an application with dojo's dnd. I've looked around

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.