Original: http://blog.csdn.net/lovelyelfpop/article/details/51328783
Estimated many people use ExtJS6 + Sencha CMD 6, encountered a situation: the development of the time clearly normal, the build after the run to report the following error
Uncaught typeerror:c is not a function
Heart 10,000 Grass mud horse Pentium: What's the hell is this? (which TM what JB thing?)
The root cause is that you forget to requires a class.
For example you use {xtype: ' Gridpanel '}, but there is no requires: ' Ext.grid.Panel ', the framework will go asynchronous (synchronous XMLHttpRequest) load JS file, However, because you are using xtype instead of the class name (the corresponding JS file cannot be found by mapping the class name and path), the asynchronous file name loaded is '. js ', which is the first error on the diagram.
Because Sencha cmd is enabled by default optimize (optimized), the error message is not very friendly. According to this console error, you have no idea which class is not requires.
Workaround:
1. Add in {ExtJS6 Project}\.sencha\app\production.properties file
Build.optimize=
(the face value is empty, which means that the CMD optimization is off)
2, build again, browser run, then you will be prompted
Unrecognized alias:xxx.yyyyyyy
then according to this alias (for example, Widget.gridpanel), you know which class is not requires.
Before using Sencha touch, there is no requires class, development status will have a warning Warn,extjs 6 instead of this feature.
Note: If you want to build without compressing the JS code, you can refer to the blog "Mobile Development Sencha project development, debugging method Recommendations"
Welcome to Sencha Touch + phonegap AC Group
1 Group: 194182999 (Full)
2 Group: 419834979
Joint Learning Communication (blogger qq:479858761)
[Sencha ExtJS] After the build production, the browser runs an error ' uncaught typeerror:c is not a function '