0

I'm getting following error when i execute sencha app build

[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExBuild: com.sencha.exceptions.ExBuild: Failed to find any  files for extjs-build\app\app\Application.js::ClassRequire::Object

extjs-build\app\app\Application.js looks like

Ext.define('PM.app.Application', {
    extend: 'Ext.app.Application',
    requires: [
        'PM.Object'
    ]
}

A file for class PM.Object exists. The path is: extjs-build\app\Object.js and extends Ext.Object with some extra functions:

PM.Object = Ext.apply(Ext.Object, {
    ...: function() {}
}

The extjs-build\.sencha\app\sencha.cfg file:

# The path(s) to application javascript sources (comma separated)
app.classpath=${app.dir}/app

My Directory looks like:

 /extjs-build/
    .sencha/
    app/
        app/
            Application.js
        data/
            SomeStore.js
        app.js
        Object.js
    ext/
        src/

I'm running sencha app build from /extjs-build/

Ext.Loader handles the issue correct (/extjs-build/app/app.js)

Ext.Loader.setConfig({
    paths: {
        'PM': './extjs-build/app'
    }
});
Ext.application('PM.app.Application');

Any suggestions?

squirrel
  • 203
  • 2
  • 9

2 Answers2

0

Your PM.Object path (extjs-build\app) is outside the build directory of you app (extjs-build\app\app)

I suspect you are running sencha app build in extjs-build\app which means the compiler will look for js files in extjs-build\app\app\ (this is because app.classpath=${app.dir}/app)

In your sencha.cfg you can change the classpath. Or move that file into the extjs-build/app/app directory.

Peter Bartels
  • 1,474
  • 1
  • 12
  • 20
  • Nope, doesn't help. I added my directory listing above. When I move `/extjs-build/app/Object.js` to `extjs-build/app/app/Object.js` Ext.Loader doesn't work – squirrel May 17 '13 at 05:33
0

I solved this issue by adding an empty

Ext.define('PM.Object', {
});

in file extjs-build/app/Object.js.

squirrel
  • 203
  • 2
  • 9