Search code examples
buildsencha-touchsencha-touch-2packagesencha-architect

Sencha Touch: Unable to Build Package: com.sencha.exceptions.ExNotFound: Unknown definition for dependency


I have a Sencha Touch App and also a Sencha Touch Package with the following basic structure:

MyApp

 /app

 /packages/MyPackage

When I try to build the package by executing:

sencha package build

(inside packages/MyPackage)

I get the following error:

[ERR] Failed to resolve dependency Ext.data.writer.Writer for file Ext.ux.MyClass [ERR] [ERR] BUILD FAILED [ERR] com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.data.writer.Writer [ERR] [ERR] Total time: 1 second [ERR] The following error occurred while executing this line: /MyApp/packages/MyPackage/.sencha/package/build-impl.xml:137: The following error occurred while executing this line: /MyApp/packages/MyPackage/.sencha/package/js-impl.xml:32: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.data.writer.Writer

MyClass extends Ext.data.writer.Writer, in the following way:

Ext.define('Ext.ux.MyClass', {
extend: 'Ext.data.writer.Writer',
alias: 'writer.myclass',

I understand that during the compiling process the source of the class Ext.data.writer.Writer cannot be determined. How can I solve this? Thank you!


Solution

  • OK Guys, I was able to build my package by editing the following config file:

    /MyApp/packages/MyPackage/.sencha/package/sencha.cfg

    I added the touch framework to the package classpath.

    Before:

    package.classpath=${package.dir}/src

    After

    package.classpath=${package.dir}/src,${touch.dir}