sencha extjs 5.0 应用程序在生产版本中不起作用 [英] sencha extjs 5.0 app not working in production build

查看:16
本文介绍了sencha extjs 5.0 应用程序在生产版本中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚用 ExtJS 5.0 构建了一个新应用,它看起来真的很棒.

I have just built a new app with ExtJS 5.0 which seems to be really awesome.

该应用在开发模式下运行良好,但一旦我使用命令行工具构建应用并部署它,它就会停止工作.

The app is working fine in development mode, but as soon as I build the app with the command line tools and deploy it, it stops working.

我在项目目录下时使用的构建命令:

The build command I use when I'm in the directory of the project:

sencha app build production

该命令到目前为止工作正常,输出中没有错误.我在 php 中使用了一个小的服务器端,所以我必须将 index.html 的结尾更改为 index.php,并在生产服务器中再次手动包含 php 文件夹.(我没有找到如何在构建过程中改变它)

The command works fine so far, no error is in the output. I'm using a little server-side with php, so I have to change the ending of the index.html to index.php and also include the php folder again manually in the production server. (I didn't find out how to change that in the build process itself)

到目前为止,在我的索引文件的基本输出中,一切似乎都很好,但由于控制台中的错误,应用程序无法启动:

so far, everything seems fine for me in the basic output of my index file, but the app won't start because of an error in the console:

GET http://admin.vp24.com/.js?_dc=1404608946314 404 (Not Found) (index):23
Uncaught TypeError: object is not a function 

Ext 试图在这里包含什么?

What does Ext try to include here?

当我在开发模式下启动应用程序时,我在网络选项卡中看到许多包含基本类文件和内容的内容 - 在这里它只包含一个名为 .js 的空文件,其中好像完全坏了.

When I start the app in development mode i see many includes of basic class files and stuff in the network tab which works - here it only starts with an include of an empty file called .js which seems totally broken.

我尝试调试 app.js 文件的 fetchSync 部分(我认为是基本的 Ext 内容),以找出我试图包含的内容点,在我看来,它是 gridfilters-plugin.

I tried to debug the part fetchSync of the app.js file (the basic Ext stuff i think) to find out which thing I he tries to include at that point and it seems to me that it is the gridfilters-plugin.

在所有这些步骤中,有些变量突然null,我不知道为什么.

Some variables are suddenly null during all that steps there and I don't know why.

应用程序有什么问题?

推荐答案

尝试 sencha app build testing 并查看您是否遇到任何运行时错误.

Try sencha app build testing and see if you get any runtime errors.

不要忘记在您的开发工具中暂停异常",这样您就可以遍历堆栈跟踪并找到罪魁祸首.

Don't forget to "pause on exceptions" in your devtools, so you can walk the stack trace and find the culprit.

这篇关于sencha extjs 5.0 应用程序在生产版本中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆