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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:40:36+00:00 2026-06-16T04:40:36+00:00

I am using require in my app and on certain android devices and every

  • 0

I am using require in my app and on certain android devices and every now and again on the web I get an error like jQuery is not defined or Backbone not defined]

my index page is simple and has a link to my require

<script data-main="js/main" src="js/vendor/require/require.js"></script>

within here I setup all paths and the call the router as well as switching off the routing for JQM

require.config({

paths: {
    jquery:     'vendor/jqm/jquery_1.7_min',
    jqm:     'vendor/jqm/jquery.mobile-1.1.0', 
    underscore: 'vendor/underscore/underscore_amd',
    backbone:   'vendor/backbone/backbone_amd',
    text:       'vendor/require/text',
    templates:  '../templates',
    views:    '../views',
    models:       '../models'
}

});

define(['router','jqm-config'], function(app) {
});

then on my router page I define what is needed there..

define(['jquery', 'underscore', 'backbone','views/home/home',
        'models/products/productCollection',
        'views/products/productTypes',   
        'jqm'], 
function($, _, Backbone,HomeView,ProductsType,ProductListView ) {

       var AppRouter = Backbone.Router.extend({
        //code here
        });

$(document).ready(function () {
    console.log('App Loaded');
    app = new AppRouter();
    Backbone.history.start();
    });

    return AppRouter;
});

how do i stop these errors occuring?

  • 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-16T04:40:38+00:00Added an answer on June 16, 2026 at 4:40 am

    In your require.config you could add a shim section to define those dependencies:

    require.config({
      // The shim config allows us to configure dependencies for
      // scripts that do not call define() to register a module
      shim : {
        'underscore' : {
          exports : '_'
        },
        'backbone' : {
          deps : [ 'underscore', 'jquery' ],
          exports : 'Backbone'
        },
        'dataTables' : {
          deps : [ 'jquery' ],
          exports : 'dataTables'
        }
      },
      paths : {
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my Node.js app, I'm passing in variables to functions by using require like
I've been messing around with a backbone.js app using require.js and a handlebars templates
I've to develop a simple Android app using the Cordova API(PhoneGap) and it requires
Am using require.js to load backbone, and my other scripts, but i get an
I have found that I have no problem using require to load something like
I am loading some template files into my application using require.js like so: define(function(require)
I am using Capistrano to manage a Java web app that is running on
I am using unobtrusive validation in an ASP.Net MVC3 app. I would like to
I am integrating Facebook authentication, registration and app requests with our web app, using
I am working with facebook app canvas which requires post. I am using express

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.