不在localhost时Extjs应用程序问题

时间:2016-12-20 18:02:49

标签: extjs extjs5

我有一个在我的localhost和UAT环境中运行的简单应用程序。最近添加了一个新组件,所有组件都在本地运行良好。

当我将应用程序部署到UAT时,我在控制台中收到以下2个错误。

/widget/label.js?_dc=1482256656320 404 (Not Found)

Uncaught TypeError: c is not a constructor(anonymous function) @ VM224:3Ext.ClassManager.Ext.apply.create @ app.js?_dc=1482256653415:1Ext.ClassManager.Ext.apply.widget @ app.js?_dc=1482256653415:1Ext.cmd.derive.create @ app.js?_dc=1482256653415:1Ext.cmd.derive.lookupComponent @ app.js?_dc=1482256653415:1Ext.cmd.derive.privates.prepareItems @ app.js?_dc=1482256653415:1Ext.cmd.derive.add @ app.js?_dc=1482256653415:1Ext.cmd.derive.initItems @ app.js?_dc=1482256653415:1Ext.cmd.derive.initComponent @ app.js?_dc=1482256653415:1Ext.cmd.derive.constructor @ app.js?_dc=1482256653415:1ak @ app.js?_dc=1482256653415:1Ext.ClassManager.Ext.apply.widget @ app.js?_dc=1482256653415:1Ext.cmd.derive.create @ app.js?_dc=1482256653415:1Ext.cmd.derive.lookupComponent @ app.js?_dc=1482256653415:1Ext.cmd.derive.lookupComponent @ app.js?_dc=1482256653415:1Ext.cmd.derive.privates.prepareItems @ app.js?_dc=1482256653415:1Ext.cmd.derive.add @ app.js?_dc=1482256653415:1Ext.cmd.derive.initItems @ app.js?_dc=1482256653415:1Ext.cmd.derive.initComponent @ app.js?_dc=1482256653415:1Ext.cmd.derive.initComponent @ app.js?_dc=1482256653415:1Ext.cmd.derive.constructor @ app.js?_dc=1482256653415:1ak @ app.js?_dc=1482256653415:1Ext.ClassManager.Ext.apply.widget @ app.js?_dc=1482256653415:1Ext.cmd.derive.create @ app.js?_dc=1482256653415:1Ext.cmd.derive.lookupComponent @ app.js?_dc=1482256653415:1Ext.cmd.derive.privates.prepareItems @ app.js?_dc=1482256653415:1Ext.cmd.derive.add @ app.js?_dc=1482256653415:1Ext.cmd.derive.initItems @ app.js?_dc=1482256653415:1Ext.cmd.derive.initComponent @ app.js?_dc=1482256653415:1Ext.cmd.derive.initComponent @ app.js?_dc=1482256653415:1Ext.cmd.derive.initComponent @ app.js?_dc=1482256653415:1Ext.cmd.derive.constructor @ app.js?_dc=1482256653415:1ak @ app.js?_dc=1482256653415:1Ext.cmd.derive.applyTabBar @ app.js?_dc=1482256653415:1k @ app.js?_dc=1482256653415:1Ext.Configurator.configure @ app.js?_dc=1482256653415:1Ext.Base.r.addMembers.initConfig @ app.js?_dc=1482256653415:1Ext.cmd.derive.constructor @ app.js?_dc=1482256653415:1ak @ app.js?_dc=1482256653415:1Ext.ClassManager.Ext.apply.widget @ app.js?_dc=1482256653415:1Ext.cmd.derive.create @ app.js?_dc=1482256653415:1Ext.cmd.derive.lookupComponent @ app.js?_dc=1482256653415:1Ext.cmd.derive.privates.prepareItems @ app.js?_dc=1482256653415:1Ext.cmd.derive.add @ app.js?_dc=1482256653415:1Ext.cmd.derive.initItems @ app.js?_dc=1482256653415:1Ext.cmd.derive.initComponent @ app.js?_dc=1482256653415:1Ext.cmd.derive.constructor @ app.js?_dc=1482256653415:1ak @ app.js?_dc=1482256653415:1Ext.ClassManager.Ext.apply.widget @ app.js?_dc=1482256653415:1Ext.cmd.derive.create @ app.js?_dc=1482256653415:1Ext.cmd.derive.lookupComponent @ app.js?_dc=1482256653415:1Ext.cmd.derive.privates.prepareItems @ app.js?_dc=1482256653415:1Ext.cmd.derive.add @ app.js?_dc=1482256653415:1Ext.cmd.derive.initItems @ app.js?_dc=1482256653415:1Ext.cmd.derive.initItems @ app.js?_dc=1482256653415:1Ext.cmd.derive.initComponent @ app.js?_dc=1482256653415:1Ext.cmd.derive.initComponent @ app.js?_dc=1482256653415:1Ext.cmd.derive.constructor @ app.js?_dc=1482256653415:1ak @ app.js?_dc=1482256653415:1Ext.ClassManager.Ext.apply.widget @ app.js?_dc=1482256653415:1Ext.cmd.derive.create @ app.js?_dc=1482256653415:1Ext.cmd.derive.lookupComponent @ app.js?_dc=1482256653415:1Ext.cmd.derive.privates.prepareItems @ app.js?_dc=1482256653415:1Ext.cmd.derive.add @ app.js?_dc=1482256653415:1Ext.Ajax.request.success @ app.js?_dc=1482256653415:1Ext.apply.callback @ app.js?_dc=1482256653415:1Ext.cmd.derive.onComplete @ app.js?_dc=1482256653415:1Ext.cmd.derive.onStateChange @ app.js?_dc=1482256653415:1(anonymous function) @ app.js?_dc=1482256653415:1

sencha app build命令成功完成,本地没有JS错误。

这可能与应用程序捆绑时的生产构建设置有关吗?如果我删除新组件,应用程序就会部署并完美运行。

1 个答案:

答案 0 :(得分:1)

我没有在新组件的requires数组中包含'Ext.form.Label'。这导致404反过来导致上面提到的第二个错误。