【问题标题】:Sencha - ExtJS - QuickTipManager - Build Failed c2008Sencha - ExtJS - QuickTipManager - 构建失败 c2008
【发布时间】:2017-11-13 08:33:20
【问题描述】:

设置:Ubuntu 16.04.3 LTS、MATE 1.12.1 我做了什么:

  1. 安装 Sencha CMD;
  2. 下载 Sencha ExtJS(试用版 6.5.2.15);
  3. 创建文件夹 /home/master/sencha/test;
  4. 做 cd /home/master/sencha/test; sencha app init --ext@6.5.2 在终端;
  5. 将下一个代码放入 app.js:

    Ext.application({
    name: 'Test',
    
    requires: [
        'Ext.tip.QuickTipManager'
    ],
    
    launch: function () {
       Ext.tip.QuickTipManager.init();
    }    
    });
    
  6. 在终端中输入sencha app watch。

我有什么:

Sencha Cmd v6.5.2.15
[INF] Processing Build Descriptor : default (development environment)
[INF] Starting server on port : 1841
[INF] Mapping http://localhost:1841/~cmd to /home/scilef/bin/Sencha/Cmd/6.5.2.15...
[INF] Mapping http://localhost:1841/ to /home/scilef/sencha/test...
[INF] Server started at port : 1841
[INF] Application available at http://localhost:1841
[INF] Loading compiler context
[INF] Loading app json manifest...
[ERR] C2008: Requirement had no matching files (Ext.tip.QuickTipManager) -- /home/scilef/sencha/test/app.js:7:150
[ERR] 
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExBuild: Failed to find any files for /home/scilef/sencha/test/app.js::ClassRequire::Ext.tip.QuickTipManager
[ERR]   at or
[ERR] g.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ERR] 
[ERR] Total time: 9 seconds

[ERR] /home/scilef/bin/Sencha/Cmd/6.5.2.15/plugin.xml:378: The following error occurred while executing this line:
/home/scilef/bin/Sencha/Cmd/6.5.2.15/ant/build/app/build-impl.xml:253: The following error occurred while executing this line:
/home/scilef/bin/Sencha/Cmd/6.5.2.15/ant/build/app/watch-impl.xml:87: The following error occurred while executing this line:
/home/scilef/bin/Sencha/Cmd/6.5.2.15/ant/build/app/build-impl.xml:387: The following error occurred while executing this line:
/home/scilef/bin/Sencha/Cmd/6.5.2.15/ant/build/app/init-impl.xml:436: com.sencha.exceptions.ExBuild: Failed to find any files for /home/scilef/sencha/test/app.js::ClassRequire::Ext.tip.QuickTipManager
[ERR] A log is available in the file "/home/scilef/sencha/test/sencha-error-20171113.log"

我在尝试要求(或使用)Ext.form.field.Number、Ext.form.field.Date 或 Ext.progressBar 时遇到相同的错误。

我是 ExtJS 的新手,我花了一整天时间寻找解决此问题的方法,但没有任何成功。我做错了什么?

【问题讨论】:

    标签: javascript extjs extjs6


    【解决方案1】:

    问题在于,从 ExtJS 6.0.0 开始,一个包中有两个工具包,分别名为 classic 和 modern。您的命令会创建一个所谓的"universal app",它支持这两个工具包。 app.js 文件也用于这两个工具包;在子文件夹classic 和modern 中,有一些文件只用于一个工具包。

    现代工具包适用于现代触控设备,经典工具包适用于带有鼠标和键盘的经典设备。

    Ext.tip.QuickTipManager 仅适用于经典工具包,因为鼠标悬停时会显示工具提示 - 您不能将鼠标悬停在触摸设备上。因此,您必须将所有 QuickTipManager 代码移动到 classic/Application.js 或您的 classic 文件夹中的任何 javascript 文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-01-10
      • 2023-03-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多