简体   繁体   中英

Getting a 404 error when deploying production build

I'm getting an error about Application.js not being found once I've copied the application over to a web server.

http://site/app/Application.js?_dc=1404504339794 404 (Not Found) 

But obviously, this is wrong since once you run sencha app build everything is minified to app.js .

I looked at the generated app.js and index.html and there is no mention of Application.js anywhere.

I'm running: sencha app build production and copying the content of the production build over.

I am also getting a C1009: Circular reference warning during the build. And here it is:

in /controller/MainContent.js at line 192

var w = Ext.widget('EditPortalUserWindow'); //this creates a widget defined in the MainContent.js VIEW

And within that view at some point in one of the widgets, I use this to define the URL of a form:

url: GlobalVars.contactPostApiUrl //if I comment this out, the warning goes away...

GlobalVars is defined in app.js

Ext.define('GlobalVars', {
    singleton: true,
    contactPostApiUrl: 'http://site/CustomerPortal.WebAPI/api/contact/post'
});

I want GlobalVars to be available from everywhere, which is why I put it in app.js.

Any ideas ? Thank you!

I have seen something similar already - the production build requiring files it shouldn't. The following should help:

  1. run the development version and see if you get any synchronous loading warning, fix if yes.
  2. run sencha app build --clean

If it does not help run this sequence

sencha ant clean
sencha app refresh
sencha app build

@Francis Ducharme Adding to the above coversation , im sending u two links which i guess might help u with C1009 . C1009 Link 1

C1009 Link 2

I "solved" this issue by actually creating the file it is looking for (an empty one) and this seems to work. Although I feel a bit uncomfortable with this fix.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM