Question

I am using jquery, backbonejs, underscorejs and bootstrap 3 for my mobile app project. I'm run my app in ripple. Sometimes I got this silly error in my console.

Uncaught Error: Load timeout for modules: app
http://requirejs.org/docs/errors.html#timeout 

Why it happened?

Thanks a lot in advance.

Was it helpful?

Solution

I have set require js config option waitSeconds to 0 and the error was gone.

My Configuration:

require.config({

  baseUrl: 'app/lib',

  paths: {
    app: '../js',
    tpl: '../tpl'
  },
  urlArgs: "bust=" +  (new Date()).getTime(),
  waitSeconds: 0,
  shim: {
    'zepto': {
        exports: '$'
    },

    'backbone': {
        //These script dependencies should be loaded before loading
        //backbone.js
        deps: ['zepto', 'underscore'],
        //Once loaded, use the global 'Backbone' as the
        //module value.
        exports: 'Backbone'
    },
    'underscore': {
        exports: '_'
    }
  }  

});

hope this help

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top