View Full Version : sencha build app succeeds, but getting error at runtime.

14 Feb 2014, 6:55 PM
I've been trying to setup using Sencha Cmd for our ExtJS 4.2.2 project, and the build completes successfully, but when I try to run the app I get this:

TypeError: comp is null

I'm running the testing build, so the app.js is concatenated but not minified.

Same thing happens if I run the production build.

If I execute from my raw source code files, the app runs fine.

Its happening in this code in the generated app.js:

* Creates new LoadMask.
* @param {Object} [config] The config object.
constructor : function(config) {
var me = this,

if (arguments.length === 2) {
if (Ext.isDefined(Ext.global.console)) {
Ext.global.console.warn('Ext.LoadMask: LoadMask now uses a standard 1 arg constructor: use the target config');
comp = config;
config = arguments[1];
} else {
comp = config.target;

// Element support to be deprecated
if (!comp.isComponent) {
if (Ext.isDefined(Ext.global.console)) {
Ext.global.console.warn('Ext.LoadMask: LoadMask for elements has been deprecated, use Ext.dom.Element.mask & Ext.dom.Element.unmask');
comp = Ext.get(comp);
this.isElement = true;

me.ownerCt = comp;
if (!this.isElement) {

if (me.store) {
me.bindStore(me.store, true);

14 Feb 2014, 10:13 PM
Anyone? Any comments on how to get Sencha Cmd working? Do others have this many problems getting this tool to work?

15 Feb 2014, 11:33 AM
No errors at all in dev mode?

Usually when it happen only on compile, you have a missing requires in your code.
If you generated with Cmd, then you should be using ext-dev and the loader .. it should show any missing requirement warnings in the console.