Note that there are some explanatory texts on larger screens.

plurals
  1. POSencha CMD: 404 errors when running built production version
    primarykey
    data
    text
    <p>I have converted my existing ExtJS 4.1.3 application to use the Sencha CMD recommended structure and tools. I created the structure first, then put my existing app JS files at the place where the single-page JS app should be located.</p> <p>I currently access the development version of my application at:</p> <pre><code>{my-server-side-app-url}/sws/dt/index.jsp </code></pre> <p>where <code>sws</code> is the <a href="http://docs.sencha.com/ext-js/4-1/#!/guide/command_workspace" rel="nofollow noreferrer">Sencha workspace</a> and <code>dt</code> is the <a href="http://docs.sencha.com/ext-js/4-1/#!/guide/command_app_single" rel="nofollow noreferrer">Sencha single-page app</a>. So far, no problems I believe. Then I run the command:</p> <pre><code>sencha app build </code></pre> <p>within my <code>app</code>'s directory. This completes with several <code>Yui Compressor Warning (Trailing comma is not legal in an ECMA-262 object initializer</code> warnings, but no errors. So I the <em>production</em> <code>index.jsp</code> page (which uses <code>all-classes.js</code> file, which receives the concatenated output of the <code>app build</code> command above) at URL:</p> <pre><code>{my-server-side-app-url}/sws/build/dt/production/index.jsp </code></pre> <p>The issue occurs when <code>all-classes.js</code> attempts to load several files which <em>in theory should be included within itself</em>. These include the controllers which are specified in <em>app.js</em>.</p> <p>Why are these files not being concatenated in <code>all-classes.js</code>? Below is a screenshot of Chrome attempting to load them from <code>all-classes.js</code>, and of course not finding them.</p> <p><img src="https://i.stack.imgur.com/Ps0bY.png" alt="enter image description here"></p> <p><em>What did I try?</em> Tried to tweak my <code>app.js</code> to <em>require</em> the controllers via <a href="http://docs.sencha.com/ext-js/4-1/#!/api/Ext.Class-cfg-requires" rel="nofollow noreferrer"><code>requires</code></a>; or to make the classes required available via <a href="http://docs.sencha.com/ext-js/4-1/#!/api/Ext.Class-cfg-uses" rel="nofollow noreferrer"><code>uses</code></a> as recommended by this <a href="https://stackoverflow.com/questions/14457508/using-sencha-cmd-with-dynamically-loaded-controllers">question/answer pair</a>, but to no avail.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload