landei
landei

Reputation: 43

SenchaTouch Error while Building with SenchaCmd: Failed to find file(s) for depdency reference

When I want to build my app with SenchaCmd I get the following error:

Failed to find file(s) for depdency reference     /workspace/SmartphoneClient/app.js::ExtRequire::Ext.ux.picker.DateTime

This is how my app.js looks:

Ext.Loader.setPath({
'Ext': 'touch/src',
'CatchMyPain': 'app',
'Ext.ux': 'extensions/ux'
});
Ext.require('Ext.ux.picker.DateTime');
Ext.require('Ext.ux.field.DateTimePicker');

The two files DateTime and DateTimePicker are in the correct folders under extension/ux/field/DateTimePicker.js and extensions/ux/picker/DateTime.js

The app works fine with the Chrome Browser and on Safari mobile Browser. There I get no Messages or Errors in the Console.

Where could be my error?

Upvotes: 0

Views: 2445

Answers (2)

landei
landei

Reputation: 43

I had to add the directory into the classpath of .sencha/app/sencha.cfg

app.classpath=${app.dir}/app.js,${app.dir}/app,${app.dir}/extensions

this way the senchaCMD found all the files.

Upvotes: 2

Peter Bartels
Peter Bartels

Reputation: 1514

Because Sencha CMD build cannot automatically resolve the paths from the loader. However it uses classpath. This should be defined in the config file (as as comma seperated list). I haven't tested it thought because I use the sencha compile command (see bellow)

From the docs: The sencha app build command knows where to find the source of your application due to the app.classpath configuration value stored in ".sencha/app/sencha.cfg". By default, this value is:

app.classpath=${app.dir}/app

Adding directories to this comma-separated list informs the compiler where to find the source code required to build the application.

Yours should be: app.classpath=${app.dir}/app, ${app.dir}/extensions/ux

If you use the sencha compile command:

sencha compile -classpath=./extensions/ux -classpath=./app page -in index.html -out test.html

Upvotes: 2

Related Questions