在 Sencha CMD 上使用构建选项的依赖关系的未知定义

问题描述 投票:0回答:2

我已经使用 ExtJS GPL 6.2 通过 Cmd 创建了一个应用程序

然后我使用以下命令创建了一个新视图:

sencha generate view -base Ext.window.Window login.Login

问题是,如果我运行“sencha app build”命令,则会出现以下错误:

[ERR] Failed to resolve dependency Ext.window.Window for file TestSte2.view.login.Login
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.window.Window
[ERR]
[ERR] Total time: 3 seconds

[ERR] C:\programs\Sencha\Cmd\6.5.2.15\plugin.xml:333: The following error occurred while executing this line:
C:\programs\workspaces\TestSte2\.sencha\app\build-impl.xml:386: The following error occurred while executing this line:
C:\programs\workspaces\TestSte2\.sencha\app\init-impl.xml:436: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.window.Window
[ERR] A log is available in the file "C:\programs\workspaces\TestSte2\sencha-error-20180109.log"

你能帮我了解一下原因吗?

谢谢 斯特凡诺

extjs build dependencies sencha-cmd
2个回答
2
投票

我正在使用经典和现代工具包构建应用程序,并且错误与现代工具包有关。 所以现在我只使用经典工具包进行编译并且它可以工作(在这种情况下我不需要现代工具包应用程序)


0
投票

我认为作者使用的是“通用”应用程序,其中包含“经典”和“现代”部分。 在这种情况下,特定的类必须位于不同的目录中。 要了解这一点,请查看 app.json: "classpath" 块:

${toolkit.name}/src - 意味着您的应用程序类具有“classic/src”和“modern/src”。

所以线索是 Ext.window.Window 类位于错误的目录中,该目录被识别为现代工具包; 这个类和像 Ext.container.Viewport 这样的类在 Ext 的现代部分中不存在,你需要更正你的文件结构。

© www.soinside.com 2019 - 2024. All rights reserved.