涟漪 - 未捕获错误:模块加载超时:app http://requirejs.org/docs/errors.html#timeout

 依一勇婷16_639 发布于 2023-02-08 15:42

我正在为我的移动应用程序项目使用jquery,backbonejs,underscorejs和bootstrap 3.我在涟漪中运行我的应用程序.有时我在控制台中遇到这个愚蠢的错误.

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

为什么会这样?

非常感谢提前.

1 个回答
  • 我已将require js config选项waitSeconds设置为0,错误消失了.

    我的配置:

    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: '_'
        }
      }  
    
    });
    

    希望这个帮助

    2023-02-08 15:44 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有