1

我打包了https://github.com/bmoeskau/Extensible

sencha generate package -type code calendar

然后我添加了这一行

package.framework=ext

到包中的.sencha/package/sencha.cfg

并要求我的应用程序的app.json中的包:

/**
 * The list of required packages (with optional versions; default is "latest").
 *
 * For example,
 *
 *      "requires": [
 *          "sencha-charts"
 *      ]
 */
"requires": [
    "calendar"
],

该包使用 编译成功sencha package build,但是当我运行sencha app refreshsencha app build构建需要该包的应用程序时,出现以下错误:

$ sencha app refresh
Sencha Cmd v5.1.3.61
[INF] Processing Build Descriptor : default
[INF] Loading app json manifest...
[ERR] C2008: Requirement had no matching files (Extensible.calendar.CalendarPanel) -- /.../app/view/main/Main.js:20:442
[ERR] 
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExBuild: Failed to find any files for /.../app/view/main/Main.js::ClassRequire::Extensible.calendar.CalendarPanel
[ERR] 
[ERR] Total time: 4 seconds
[ERR] The following error occurred while executing this line:
/Users/me/bin/Sencha/Cmd/5.1.3.61/plugins/ext/current/plugin.xml:403: The following error occurred while executing this line:
/.../.sencha/app/build-impl.xml:378: The following error occurred while executing this line:
/.../.sencha/app/init-impl.xml:303: com.sencha.exceptions.ExBuild: Failed to find any files for /.../app/view/main/Main.js::ClassRequire::Extensible.calendar.CalendarPanel

如果我从 Ext JS 5 的示例文件夹中获取日历示例,并以相同的方式打包它,它就可以工作。

也许它与Extensible命名空间有关?我错过了一些重要的东西吗?

4

1 回答 1

0

"calendar"我的包目录中的 package.json 文件中有一个名称为旧包。尽管旧包的文件夹名称与其名称不匹配,但它在我编译应用程序时首先加载。我在 package.json 文件中重命名了包。现在它可以工作并找到可扩展的。

于 2015-09-08T09:46:39.740 回答