extjs 找不到外部网格树

f0brbegy  于 2022-11-05  发布在  其他
关注(0)|答案(1)|浏览(165)

我试图在我的Extjs项目中使用Ext.grid.Tree。但是看起来'tree'组件在默认情况下没有被添加到extjs项目中。
我使用“ext-genapp-i”创建了新的ExtJs应用程序
然后我又补充了一句“要求:['Ext.grid. Tree']”添加到MyExtGenApp. Application中。尝试构建应用程序“ Sencha app build”,但出现错误:

[ERR] D:\WORKSPACES\my-ext-gen-app\node_modules\@sencha\cmd\dist\plugin.xml:333: The following error occurred while executing this line:
D:\WORKSPACES\my-ext-gen-app\node_modules\@sencha\cmd\dist\ant\build\app\build-impl.xml:387: The following error occurred while executing this line:
D:\WORKSPACES\my-ext-gen-app\node_modules\@sencha\cmd\dist\ant\build\app\init-impl.xml:436: com.sencha.exceptions.ExBuild: Failed to find any files for D:\WORKSPACES\my-ext-gen-app\app\desktop\src\Application.js::ClassRequire::Ext.grid.Tree

我没有改变任何EXEP“要求:['外部网格树']"。
“ext-modern-treegrid”节点模块似乎未包含在项目中。
我做错了什么?
谢谢你!

cgvd09ve

cgvd09ve1#

对于modernt工具包,因为它是stated in the docsExt.tree.Grid需要单独的NPM包@ Sencha /ext-modern-treegrid。
因此,您必须使用npm i --save @sencha/ext-modern-treegrid安装它,并将其名称“treegrid”添加到app.json中的requires(* 您可以在\node_modules@ Sencha {package}\package.json中的“sencha”部分检查ExtJS包名称 *):

"requires": [
    "treegrid"
],

这样可以修复以下错误:
无法解析外部网格树依赖关系
com.sencha.exceptions.ExNotFound:未知的相依性定义:Ext.grid.Tree

相关问题