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 9251611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:44:46+00:00 2026-06-18T10:44:46+00:00

I am using ‘require.js’ in my app, i am getting this error : ReferenceError:

  • 0

I am using ‘require.js’ in my app, i am getting this error :

ReferenceError: Can't find variable: appModel
require.js:32Error: Load timeout for modules: listView

i unable to understand what is wrong with my side:

my config is :

requirejs.config({
    baseUrl:"scripts",
    paths:{
        //libraries
        jquery          :"lib/jquery-1.9.0.min",
        jqueryUI        :"lib/jquery-ui-1.9.2.custom.min",
        underScore      :"lib/lodash-1.0.0.min",
        backBone        :"lib/backbone-min",
        //scripts
        appInit         :"js/tasklist",
        loginValidate   :"js/loginValidate",
        listModel       :"js/models/listModel",
        listCollection  :"js/collections/listCollection",
        listView        :"js/views/listView"
    },
    shim:{
        "underScore":{
            exports: "_"
        },
        "backBone":{
            exports:"Backbone",
            deps:["underScore"]
        },
        "appInit" : {
            deps:["jquery","jqueryUI","underScore","backBone"]
        },
        "jqueryUI":{
            deps:["jquery"]
        },
        "loginValidate":{
            deps:['jquery']
        },
        "listModel":{
            exports:"listModel",
            deps:["backBone"]
        },
        "listCollection":{
            exports:"listCollection",
            deps:["listModel"]
        },
        "listView":{
            exports:"listView",
            deps:["listModel","listCollection"]
        }
    }
});

require(['jquery'],function(){
    if($('#tlLoginForm').length){
        require(["jquery","loginValidate"],function($){
            $(function(){
                var paramsLoginForm = {
                        loginForm : $('#tlLoginForm')
                    };
                var validate = tasklistHandler(paramsLoginForm);
                validate.init(); //it works fine.
            });
        });
    }
    if($("#boardTemplate").length){ // i am finding my template and initiating the values
        require(["backBone","listModel","listCollection","listView"], function(){

        });
    };
});

my model in the listModel.js

require(['jquery','backBone'],function($,Backbone){ // i am importing jquery, and backbone and assigning the model
var appModel = Backbone.Model.extend({
        url : 'data/data.json',
        defaults:{
          "id"                  :"id",
          "title"               :"Title",
          "projectName"         :"project",
          "dueDays"             :0,
          "dueTime"             :0,
          "dueDate"             :"0-0-0000",
          "totalTasks"          :0,
          "taskCompleted"       :0,
          "percent"             :65,
          "taskStatus"          :"Assigned",
          "jobtype"             :"vip",
          "username"            :"scott.pierce@groupfmg.com",
          "notes"               :"notes1"
        }  
      });

      return appModel; // tried not works
});

my collection in listCollection.js

define(["jquery","backBone","listModel"],function($,Backbone,model){ 

// i am importing jquery, backbone, and model i declared in listModel.js, but it’s not
work!
console.log(‘collection’,model); // i am getting undefined for model
var collection = Backbone.Collection.extend({
model:model,
initialize:function(){
console.log(this.model);
}
});

    var newModel = new appModel; //ReferenceError: Can't find variable: appModel
    console.log(newModel); // throw the error as like i mentioned.
});

any one can help me to correct my issue please?

  • 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-18T10:44:47+00:00Added an answer on June 18, 2026 at 10:44 am

    This is works for me..

    Instead of using "require" i used "define". it all sets fine now.

    thanks all.

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

Sidebar

Related Questions

using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using getDefinitionByName I am consistently getting the error saying it is not defined (as
Using ember 1.0.0-pre3 I have a little app that has this code: window.App =
using xmltextreader, how would I load a hashtable. XML: <base><user name=john>2342343</user><user name=mark>239099393</user></base> This was
Using CI for the first time and i'm smashing my head with this seemingly
Using Location.getBearing(); I seem to get randomly changing bearings. Aka, I can turn the
Using this approach I have made my static method calls an Action in the
using phpPgAdmin, I've tried to create a table in my database. But am getting
Using this as an example, how could I scale the graphic such that it's
Using this is very helpful when trying to generate html code in c#. var

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.