Sencha CMD - Build Error: Mixed-Mode x-compile and microload markup is currently unsupported

无人久伴 提交于 2019-12-12 04:54:45

问题


Good day, I am trying to build my ExtJS 4.2 application and I am using Sencha Architect 3.1 and Sencha CMD 5.1.1.39 for the OSX.

I was following this tutorial on how to build from the Terminal, and as expected, I got this error:

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

Upon googling, I came upon this thread from Sencha discussing how to get around this error.

What I did next was to remove lines from my app.json file which originally looked like this:

{
   "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
      }
   ]
}

and removed the "css" and "resources" parts as suggested in the tutorial above. However, I still had the same error.

My index.html file looks as such:

<!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>

Upon reading the thread in the sencha website, it seemed that I had to choose over the app.json and the index.html file. So I tried and deleted the "resources" and "css", contents first then the entire thing after, and attempted to build it but to no avail. I still got the error.

I'm really dumbfounded and I'm trying to build and publish my web application so that the user doesn't have to load a whole lot of ExtJS scripts, a good chunk of which are not of use anyway.

I'm also confused because both index.html and app.json(along with app.js and app.json.meta) seem to be auto be auto generated by Sencha Architect 3.1. It does not make sense for an IDE to generate files that will seem to conflict later on during the build and publish process.

Also, the Sencha Thread is already 8 years old. I don't know how to go about this beyond the tips provided there.

Can anyone help me with this issue? Any help is very much appreciated. Thank you.


回答1:


I've solved this by downgrading to Sencha CMD 5.1.0.26 (which solved another issue with 5.1.1.39, see [1]) and removing the js and css parts completely:

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

And yes, its a shame how a product that costs so much is maintained so incredibly bad.

[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



来源:https://stackoverflow.com/questions/28528666/sencha-cmd-build-error-mixed-mode-x-compile-and-microload-markup-is-currently

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!