2016-02-18 139 views
1

我创建了一个包煎茶“共同”使用煎茶命令工作区包:Extjs6依赖问题与

sencha generate package common 

,并放置在文件工作区/包/本地/称为“mytext.js” SRC:

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);  
    } 
}); 

在我的主应用程序中,我在我的app.json文件中包含了“common”的要求。

当我做了sencha app refresh我得到以下相关性错误:

[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 

我错过了一些配置?谢谢。

+0

是'workspace/packages/local/common/src'中的文件吗? –

+0

CD。感谢您的回应。是的,这是我放置文件的地方。 – user1532602

+0

你使用'现代'工具包吗? “现代”工具包没有这样的类... –

回答