Elcid_91
Elcid_91

Reputation: 1681

Extjs6 Dependency Issues with workspace packages

I have created a sencha package "common" using the sencha command:

sencha generate package common

and placed a file in the workspace/packages/local/src called "mytext.js":

Ext.define('Common.mytext',{
    extend: 'Ext.form.field.Text',
    xtype: 'mytext',    
    initComponent: function(){
        Ext.apply(this,{
            onBlur: function(){     
              //Set The corrected value for the field       
            }
        });
        this.callParent(arguments);     
    }
});

In my main application, I include the requirement "common" in my app.json file.

When I do asencha app refresh I get the following dependency errors:

[ERR] Failed to resolve dependency Ext.form.field.Text for file Common.mytext
[ERR] 
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.form.field.Text
[ERR] 
[ERR] Total time: 1 second
[ERR] The following error occurred while executing this line:
/home/xxxxxxxxx/bin/Sencha/Cmd/6.0.2.14/plugins/ext/current/plugin.xml:427: The following error occurred while executing this line:
/var/www/xxxxxx/apps/client/.sencha/app/build-impl.xml:381: The following error occurred while executing this line:
/var/www/xxxxxx/apps/client/.sencha/app/init-impl.xml:382: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.form.field.Text

Am I missing some configuration? Thanks.

Upvotes: 1

Views: 1585

Answers (1)

hwsw
hwsw

Reputation: 2606

You may need to add the framework to your package.json.

Give this a try:

"framework": "ext"

https://docs.sencha.com/cmd/6.x/cmd_packages/cmd_creating_packages.html#framework


Or you can try defining the framework here: .sencha/package/sencha.cfg by adding:

package.framework=ext 

Upvotes: 0

Related Questions