【问题标题】:Sencha CMD - Build Error: Mixed-Mode x-compile and microload markup is currently unsupportedSencha CMD - 构建错误:混合模式 x-compile 和 microload 标记目前不受支持
【发布时间】:2015-02-15 17:07:53
【问题描述】:

我正在尝试构建我的 ExtJS 4.2 应用程序,并且我正在为 OSX 使用 Sencha Architect 3.1 和 Sencha CMD 5.1.1.39。

我正在关注this tutorial 如何从终端构建,正如预期的那样,我收到了这个错误:

com.sencha.exceptions.ExBuild: Mixed-Mode x-compile and microload markup is currently unsupported

通过搜索,我发现this thread from Sencha 正在讨论如何解决此错误。

我接下来要做的是从我的 app.json 文件中删除最初看起来像这样的行:

{
   "name": "my_app_name",
   "requires": [],
   "id": "eceafdc4-45e6-4dc1-b51a-75af9b7887a6",
   "resources": [
      "resources/css/rowCSS.css",
      "resources/css/receiptGrid.css",
      "resources/css/propertyGrid.css",
      "resources/css/msgBox.css",
      "resources/css/popWindow.css",
      "resources/css/passwordPrompt.css",
      "resources/css/textStyles.css"
   ],
   "theme": "ext-theme-classic-3ea6533d-fc56-477c-9143-5085a431c7f3",
   "js": [
      {
         "path": "app.js",
         "bundle": true
      }
   ],
   "css": [
      {
         "path": "bootstrap.css",
         "bootstrap": true
      }
   ]
}

并按照上面教程中的建议删除了“css”和“resources”部分。但是,我仍然有同样的错误。

我的index.html 文件如下所示:

<!DOCTYPE HTML>

<html>
<head>
    <meta charset="UTF-8">
    <title>my_app_name</title>
    <!-- <x-compile> -->
        <!-- <x-bootstrap> -->
            <script src="ext/ext-dev.js"></script>
            <script src="bootstrap.js"></script>
        <!-- </x-bootstrap> -->
        <script src="app/override/form/Panel.js"></script>
        <script type="text/javascript" src="app.js"></script>
    <!-- </x-compile> -->
                <link rel="stylesheet" href="bootstrap.css">

    <link rel="stylesheet" href="resources/css/rowCSS.css" id="child-row">
    <link rel="stylesheet" href="resources/css/receiptGrid.css" id="receiptGrid">
    <link rel="stylesheet" href="resources/css/propertyGrid.css" id="propertyGrid">
    <link rel="stylesheet" href="resources/css/msgBox.css" id="msgBox">
    <link rel="stylesheet" href="resources/css/popWindow.css" id="popWindow">
    <link rel="stylesheet" href="resources/css/passwordPrompt.css" id="passwordPrompt">
    <link rel="stylesheet" href="resources/css/textStyles.css" id="textStyles">
</head>
<body>
</body>
</html>

在阅读 Sencha 网站上的帖子时,我似乎不得不选择 app.jsonindex.html 文件。所以我尝试删除“资源”和“css”,首先是内容,然后是整个内容,并尝试构建它但无济于事。我仍然收到错误。

我真的傻眼了,我正在尝试构建和发布我的 Web 应用程序,这样用户就不必加载大量的 ExtJS 脚本,其中很大一部分无论如何都没有用。

我也很困惑,因为index.htmlapp.json(以及app.jsapp.json.meta)似乎都是由 Sencha Architect 3.1 自动生成的。 IDE 生成的文件在构建和发布过程中稍后似乎会发生冲突是没有意义的。

另外,煎茶线已经有 8 年历史了。除了那里提供的提示之外,我不知道如何解决这个问题。接下来我可以尝试什么?

【问题讨论】:

  • 你的索引文件是什么样子的,可以发一下吗?

标签: extjs extjs4 extjs4.2 sencha-architect sencha-cmd


【解决方案1】:

我已经通过降级到 Sencha CMD 5.1.0.26(它解决了 5.1.1.39 的另一个问题,参见 [1])并完全删除了 jscss 部分解决了这个问题:

{
   ...
   "theme": "ext-theme-classic-3ea6533d-fc56-477c-9143-5085a431c7f3"
}

是的,如此昂贵的产品如何维护得如此糟糕,真是太可惜了。

[1]https://www.sencha.com/forum/showthread.php?297673-Bug-Incorrect-encoding-on-concatenated-JS-file-in-Sencha-Cmd-5.1.1.39&p=1087279&viewfull=1#post1087279

【讨论】:

    猜你喜欢
    • 2017-12-30
    • 1970-01-01
    • 2022-06-17
    • 1970-01-01
    • 2017-05-06
    • 1970-01-01
    • 1970-01-01
    • 2013-05-01
    • 1970-01-01
    相关资源
    最近更新 更多